1-laboratoriya mashg'uloti. Java dasturlash tili haqida tushuncha



Download 3,68 Mb.
bet29/54
Sana06.07.2022
Hajmi3,68 Mb.
#746840
1   ...   25   26   27   28   29   30   31   32   ...   54
Nazorat savollari
1. Android tizimida foydalanuvchi interfeysini yaratishda qanday layout (qolip) lardan foydalaniladi
2. Oriyentatsiyani ―Anchoring‖boshqarish usuoi va uning asosiy xususiyatini ayting?
3. Oriyentatsiyani ―Resizingandrepositioning‖ boshqarish usuoi va uning asosiy xususiyatini ayting?
4. List view larga qaysilar kiradi va ularning asosiy vazifasi nima?
5. ImageButton va Button ning qanday farqi mavjud?
6. EditText komponentasi holatini faqat maxfiysо‘z (parol)kiritishga mо‘lajallash uchunEditText elementiga qanday attribut qо‘shish lozim?
7. CheckBox qiymati trueѐkifalse ekanligini tekshirish uchun CheckBox sinfining qanday metoddan foydalaniladi?
8. Gallery nima uchun ishlatiladi va Gallery sinfining qanday metodlari mavjud?

17-laboratoriya mashg'uloti. Xabar jo‘natish uchun foydalanuvchi interfeysini yaratish.


Ishdan maqsad: Android tizimida foydalanuvchi interfeysini yaratish va ilovaga mos ma’lumotlarni serverdan о‘qib olish, JSON xizmatidan foydalanish kо‘nikmalariga ega bо‘lish
Masalaning qо‘yilishi: Talabalar berilgan loyihani Android tizimida ishlab chiqish va ilova uchun kerakli bо‘lgan ma’lumotlarni json xizmati orqali serverdan о‘qib olishi va emulator orqali natija olishi lozim.
Ishni bajarish tartibi
JSON dan foydalanish
1. Yangi Android loyiha yaratamiz va uni UsingJSON deb nomlaymiz
2. Loyiha quyidagi fayllardan iborat va ularni quyidagi slaydlarda kо‘rsatilganidek о‘zgartiramiz
3. res/layout/activity_main.xml
4. res/values/string.xml
5. AndroidManifest.xml
6. src/package/MainActivity.java
7. src/package/HandleJSON.java

res/layout/activity_main.xml
RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="15dp"
android:text="@string/location"
android:textAppearance="?android:attr/textAppearanceMedium" />
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/textView1"
android:layout_alignParentRight="true"
android:ems="10" />
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:layout_marginTop="68dp"
android:text="@string/country"
android:textAppearance="?android:attr/textAppearanceSmall" />
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_marginTop="19dp"
android:text="@string/temperature"
android:textAppearance="?android:attr/textAppearanceSmall" />
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView3"
android:layout_below="@+id/textView3"
android:layout_marginTop="32dp"
android:text="@string/humidity"
android:textAppearance="?android:attr/textAppearanceSmall" />
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView4"
android:layout_below="@+id/textView4"
android:layout_marginTop="21dp"
android:text="@string/pressure"
android:textAppearance="?android:attr/textAppearanceSmall" />
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/textView3"
android:layout_toRightOf="@+id/textView3"
android:ems="10" >


android:id="@+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView3"
android:layout_alignBottom="@+id/textView3"
android:layout_alignLeft="@+id/editText2"
android:ems="10" />
android:id="@+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/textView5"
android:layout_alignLeft="@+id/editText1"
android:ems="10" />
android:id="@+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView5"
android:layout_alignBottom="@+id/textView5"
android:layout_alignRight="@+id/editText4"
android:ems="10" />

Download 3,68 Mb.

Do'stlaringiz bilan baham:
1   ...   25   26   27   28   29   30   31   32   ...   54




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

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish