Toshkent axborot texnologiyalari universiteti dasturiy vositalar xavfsizligi


Download 0.5 Mb.
bet2/5
Sana20.01.2023
Hajmi0.5 Mb.
#1104663
1   2   3   4   5
Bog'liq
Jamoaviy ish 010-18 Qurbonov Sh

Chiqish interfeysi:



3-qadam: Menyuni ko'rsatish uchun yangi tartib yarating
Ilova> res> o'ng tugmasini bosing> Yangi> Katalogga o'ting va menyuga nom bering. Keyin ilova > res > menyu > Yangi > Menyu resurs faylini bosing va faylga add_note_menu nom bering. Quyida add_note_menu.xml faylining kodi keltirilgan.


XML


User to delete and edit the data-->










4-qadam: Yangi bo'sh harakat yarating
Ilova> java> o'ng tugmasini bosing> Yangi> Harakat> Bo'sh faoliyat-ga o'ting va uni NoteEditorActivity deb nomlang. Ushbu mashqda biz qaydlarimizni kiritamiz. Shunday qilib, activity_note_editor.xml faylida ListViewga ma'lumotlarni qo'shish uchun EditText qo'shing. Quyida activity_note_editor.xml faylining kodi keltirilgan.


XML


xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".NoteEditorActivity">




android:id="@+id/editText"
android:layout_width="0dp"
android:layout_height="0dp"
android:ems="10"
android:gravity="top|left"
android:inputType="textMultiLine"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />




Endi NoteEditorActivity.java fayli ma'lumotlarni saqlash uchun kodni yozadi. Telefoningiz xotirasiga maʼlumotlarni saqlash uchun ilovangizga SharedPreference qoʻshing.



Download 0.5 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling