Adroi Mai
Adroi Mai
Adroi Mai
</resources>
Layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/tvDialogName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Họ và tên: " />
<TextView
android:id="@+id/tvDialogAge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tuổi: " />
<TextView
android:id="@+id/tvDialogMovie"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Phim: " />
</LinearLayout>
Activittes java
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/tvDialogName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Họ và tên: " />
<TextView
android:id="@+id/tvDialogAge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tuổi: " />
<TextView
android:id="@+id/tvDialogMovie"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Phim: " />
</LinearLayout>
Layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<Button
android:id="@+id/buttonIncreaseAge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TUỔI +"
android:background="@color/purple"
android:textColor="@android:color/white"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"/>
<Button
android:id="@+id/buttonDecreaseAge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TUỔI -"
android:background="@color/purple"
android:textColor="@android:color/white"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp"
android:layout_below="@id/buttonIncreaseAge"
android:layout_above="@id/buttonDecreaseAge">
<TextView
android:id="@+id/tvAge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tuổi: 0" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Họ và tên" />
<EditText
android:id="@+id/etName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Điền vào đây" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Giới tính" />
<RadioGroup
android:id="@+id/radioGroupGender"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/radioMale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nam" />
<RadioButton
android:id="@+id/radioFemale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nữ" />
<RadioButton
android:id="@+id/radioOther"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Khác" />
</RadioGroup>
<Button
android:id="@+id/buttonRegister"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ĐĂNG KÝ"
android:background="@color/purple"
android:textColor="@android:color/white" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Phim" />
<ListView
android:id="@+id/listViewMovies"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</ListView>
</LinearLayout>
</RelativeLayout>
String
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<Button
android:id="@+id/buttonIncreaseAge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TUỔI +"
android:background="@color/purple"
android:textColor="@android:color/white"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"/>
<Button
android:id="@+id/buttonDecreaseAge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TUỔI -"
android:background="@color/purple"
android:textColor="@android:color/white"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp"
android:layout_below="@id/buttonIncreaseAge"
android:layout_above="@id/buttonDecreaseAge">
<TextView
android:id="@+id/tvAge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tuổi: 0" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Họ và tên" />
<EditText
android:id="@+id/etName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Điền vào đây" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Giới tính" />
<RadioGroup
android:id="@+id/radioGroupGender"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/radioMale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nam" />
<RadioButton
android:id="@+id/radioFemale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nữ" />
<RadioButton
android:id="@+id/radioOther"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Khác" />
</RadioGroup>
<Button
android:id="@+id/buttonRegister"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ĐĂNG KÝ"
android:background="@color/purple"
android:textColor="@android:color/white" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Phim" />
<ListView
android:id="@+id/listViewMovies"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</ListView>
</LinearLayout>
</RelativeLayout>
Thmes
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.BaiKT"
parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>