Guruh talabasi Zokirov Shohnurjon 2-labarotariya
Download 102,21 Kb.
|
1-lab
- Bu sahifa navigatsiya:
- O’qituvchi ma’lumotlari hamda narxi haqidagi bitta ma’lumot ko’rinishi
312-18-guruh talabasi Zokirov Shohnurjon 2-labarotariya Laboratoriyani bajarish uchun Android Studio dasturidan foydalandim, ya’ni O’quv Markazi admini uchun yangi kurs qo’shish, kursga tegishli yangi o’qituvchini qo’shish, o’chirish hamda o’zgartirish kabi kichik funksiyalarni bajaruvchi dastur. Bu MainActivity.kt ya’ni dasturga birinchi kirganda ochiladigan oyna. Bunda bazadagi kurslar ro’yxati chiqadi, + tugmasini bosish orqali yangi kurs qo’shish uchun dialog ochiladi Bu SecondActivity.kt, ya’ni mavjud kursni tanlab kirganda ochiladigan oyna. Bu oynada kursga tegishli o’qituvchilar ro’yxati hamda narxi haqida malumotlarni kiritish, o’chirish hamda o’zgartirish mumkin. Quida bu ko’rinishni shakllantirish uchun yozilgan kodlar keltirilgan: activity_main.xml xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".activities.MainActivity"> android:layout_height="wrap_content" android:layout_margin="26dp" android:id="@+id/addCourse" android:src="@drawable/ic_baseline_add_24" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" /> android:layout_height="match_parent" tools:listitem="@layout/item_course" android:orientation="vertical" android:padding="8dp" android:id="@+id/course_list" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layout_constraintTop_toTopOf="parent" /> Ochiladigan dialog ko’rinishi: android:layout_height="wrap_content" android:orientation="vertical" android:padding="8dp"> android:layout_width="match_parent" android:layout_height="64dp" android:hint="Enter Course Name" android:padding="4dp" android:paddingStart="8dp" android:textColor="@color/black" android:textSize="26sp" /> android:layout_height="?actionBarSize" android:gravity="end|center" android:orientation="horizontal"> android:id="@+id/cancel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:text="Cancel" android:textAllCaps="false" android:textColor="#C94949" /> android:id="@+id/save" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:text="Save" android:textAllCaps="false" android:textColor="#C94949" /> Bitta kurs ma’lumoti ko’rinishi: xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:padding="4dp" android:layout_height="wrap_content"> app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toTopOf="parent" app:cardCornerRadius="2dp" app:cardBackgroundColor="#C9BDF1F8" android:layout_width="match_parent" android:layout_height="wrap_content"> android:layout_width="match_parent" android:layout_height="match_parent"> tools:text="1" android:textColor="@android:color/black" android:textSize="32sp" android:gravity="center" android:layout_width="64dp" android:layout_height="match_parent"/> android:gravity="center_vertical" tools:text="Matematika" android:textColor="@android:color/black" android:textSize="32sp" android:id="@+id/nameCourse" android:layout_width="wrap_content" android:layout_height="match_parent" tools:ignore="RtlSymmetry" /> android:layout_width="match_parent" android:orientation="vertical" android:layout_height="match_parent"> android:textAllCaps="false" android:text="delete" android:id="@+id/delete" android:backgroundTint="@android:color/holo_blue_dark" android:layout_width="wrap_content" android:layout_height="wrap_content"/> android:textAllCaps="false" android:text="edit" android:id="@+id/edit" android:backgroundTint="@android:color/holo_blue_dark" android:layout_width="wrap_content" android:layout_height="wrap_content"/> activity_second.xml android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" tools:context=".activities.SecondActivity"> android:layout_height="wrap_content" android:layout_margin="26dp" android:id="@+id/addTeacher" android:src="@drawable/ic_baseline_add_24" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" /> android:layout_height="match_parent" tools:listitem="@layout/item_teacher" android:orientation="vertical" android:padding="8dp" android:id="@+id/teacher_list" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layout_constraintTop_toTopOf="parent" /> O’qituvchi ma’lumotlari hamda narxi haqidagi bitta ma’lumot ko’rinishi: xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:padding="4dp" android:layout_height="wrap_content"> app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toTopOf="parent" app:cardCornerRadius="2dp" app:cardBackgroundColor="#C9BDF1F8" android:layout_width="match_parent" android:layout_height="wrap_content"> android:layout_width="match_parent" android:layout_height="match_parent"> tools:text="1" android:textColor="@android:color/black" android:textSize="32sp" android:gravity="center" android:layout_width="64dp" android:layout_height="match_parent"/> android:layout_width="wrap_content" android:layout_height="match_parent"> android:gravity="center_vertical" tools:text="Matematika" android:textColor="@android:color/black" android:textSize="32sp" android:id="@+id/nameTeacher" android:layout_width="match_parent" android:layout_height="wrap_content" tools:ignore="RtlSymmetry" /> android:id="@+id/price" android:textSize="24sp" android:paddingEnd="8dp" android:gravity="end" android:layout_width="match_parent" android:layout_height="wrap_content" tools:ignore="RtlSymmetry" /> android:layout_width="match_parent" android:orientation="vertical" android:layout_height="match_parent"> android:textAllCaps="false" android:text="delete" android:id="@+id/delete" android:backgroundTint="@android:color/holo_blue_dark" android:layout_width="wrap_content" android:layout_height="wrap_content"/> android:textAllCaps="false" android:text="edit" android:id="@+id/edit" android:backgroundTint="@android:color/holo_blue_dark" android:layout_width="wrap_content" android:layout_height="wrap_content"/> O’qituvchi qo’shish uchun chiqadigan dialog ko’rinishi: android:layout_height="wrap_content" android:orientation="vertical" android:padding="8dp"> android:layout_width="match_parent" android:layout_height="64dp" android:hint="Enter Teacher Name" android:padding="4dp" android:paddingStart="8dp" android:textColor="@color/black" android:textSize="26sp" /> android:layout_width="match_parent" android:layout_height="64dp" android:hint="Enter Course Price" android:padding="4dp" android:inputType="number" android:paddingStart="8dp" android:textColor="@color/black" android:textSize="26sp" /> android:layout_height="?actionBarSize" android:gravity="end|center" android:orientation="horizontal"> android:id="@+id/cancel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:text="Cancel" android:textAllCaps="false" android:textColor="#C94949" /> android:id="@+id/save" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:text="Save" android:textAllCaps="false" android:textColor="#C94949" /> Download 102,21 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling