0% found this document useful (0 votes)
3 views5 pages

Code

The document is an XML layout file for an Android application using a ConstraintLayout. It includes various UI elements such as TextViews, EditTexts for inputting student information, and buttons for adding, editing, and deleting entries. Additionally, a RecyclerView is included to display a list of scores for the students.

Uploaded by

kienkun0402
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Code

The document is an XML layout file for an Android application using a ConstraintLayout. It includes various UI elements such as TextViews, EditTexts for inputting student information, and buttons for adding, editing, and deleting entries. Additionally, a RecyclerView is included to display a list of scores for the students.

Uploaded by

kienkun0402
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

<?xml version="1.0" encoding="utf-8"?

>
<androidx.constraintlayout.widget.ConstraintLayout
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"
android:background="#D2FAC1"
tools:context=".main_diem">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/gline_doc"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.28"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/tv_dsdiem"
android:text="Danh sách điểm học phần"
android:textSize="28sp"
android:textStyle="bold"
android:textAllCaps="true"
android:gravity="center"
android:textColor="#2137FA"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/masv1"
android:text="Mã SV:"
android:textSize="25sp"
android:textStyle="bold"
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"
app:layout_constraintTop_toBottomOf="@+id/tv_dsdiem"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/edt_masv1"
android:hint="Nhập mã sinh viên"
android:textSize="25sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@+id/tv_dsdiem"
app:layout_constraintLeft_toRightOf="@id/gline_doc"
android:layout_width="300dp"
android:layout_marginTop="5dp"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/lop1"
android:text="Lớp:"
android:textSize="25sp"
android:textStyle="bold"
android:layout_marginLeft="10dp"
android:layout_marginTop="20dp"
app:layout_constraintTop_toBottomOf="@+id/masv1"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/edt_lop1"
android:hint="Nhập lớp"
android:textSize="25sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@+id/edt_masv1"
app:layout_constraintLeft_toRightOf="@id/gline_doc"
android:layout_marginTop="5dp"
android:layout_width="300dp"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/monhoc"
android:text="Môn học:"
android:textSize="25sp"
android:textStyle="bold"
android:layout_marginLeft="10dp"
android:layout_marginTop="25dp"
app:layout_constraintTop_toBottomOf="@+id/lop1"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/edt_monhoc"
android:hint="Nhập môn học"
android:textSize="25sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@+id/edt_lop1"
app:layout_constraintLeft_toRightOf="@id/gline_doc"
android:layout_marginTop="5dp"
android:layout_width="300dp"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/diem1"
android:text="Điểm:"
android:textSize="25sp"
android:textStyle="bold"
android:layout_marginLeft="10dp"
android:layout_marginTop="25dp"
app:layout_constraintTop_toBottomOf="@+id/monhoc"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/edt_diem1"
android:hint="Nhập điểm"
android:textSize="25sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@+id/edt_monhoc"
app:layout_constraintLeft_toRightOf="@id/gline_doc"
android:layout_marginTop="5dp"
android:layout_width="300dp"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@id/edt_diem1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:gravity="center"
android:layout_margin="8dp">

<Button
android:id="@+id/btn_Them1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Thêm" />

<Button
android:id="@+id/btn_Sua1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sửa"
android:layout_marginStart="8dp"/>

<Button
android:id="@+id/btn_Xoa1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Xóa"
android:layout_marginStart="8dp"/>

<Button
android:id="@+id/btn_Quaylai1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Quay lại"
android:layout_marginStart="8dp"/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/diem1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="80dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

You might also like