|
fragment_product_detail.xml
|
1 <?xml version="1.0" encoding="utf-8"?>
2 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:app="http://schemas.android.com/apk/res-auto"
4 android:layout_width="match_parent"
5 android:layout_height="match_parent"
6 android:background="@drawable/bg_app2"
7 android:padding="16dp">
8
9 <TextView
10 android:id="@+id/tv_title"
11 android:layout_width="wrap_content"
12 android:layout_height="wrap_content"
13 android:text="@string/title_fragment"
14 android:textSize="24sp"
15 android:textColor="@color/white"
16 android:textStyle="bold"
17 android:layout_marginBottom="8dp"
18 app:layout_constraintBottom_toTopOf="@+id/cv_product_image"
19 app:layout_constraintEnd_toEndOf="parent"
20 app:layout_constraintStart_toStartOf="parent" />
21
22 <com.google.android.material.card.MaterialCardView
23 android:id="@+id/cv_product_image"
24 android:layout_width="match_parent"
25 android:layout_height="200dp"
26 app:cardCornerRadius="16dp"
27 app:cardElevation="0dp"
28 app:strokeWidth="0dp"
29 android:layout_marginTop="36dp"
30 app:layout_constraintTop_toTopOf="parent">
31
32 <ImageView
33 android:id="@+id/iv_product_detail_image"
34 android:layout_width="match_parent"
35 android:layout_height="match_parent"
36 android:scaleType="centerCrop"
37 android:background="@drawable/rounded_button"
38 android:src="@drawable/ic_menu" />
39
40 </com.google.android.material.card.MaterialCardView>
41
42 <Button
43 android:id="@+id/btn_select_image"
44 style="@style/Widget.Material3.Button.TextButton"
45 android:layout_width="wrap_content"
46 android:layout_height="wrap_content"
47 android:text="@string/select_image"
48 android:textColor="@color/white"
49 app:layout_constraintEnd_toEndOf="parent"
50 app:layout_constraintStart_toStartOf="parent"
51 app:layout_constraintTop_toBottomOf="@id/cv_product_image" />
52
53 <com.google.android.material.textfield.TextInputLayout
54 android:id="@+id/til_product_name"
55 style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
56 android:layout_width="match_parent"
57 android:layout_height="wrap_content"
58 android:layout_marginTop="8dp"
59 android:hint="@string/name_product_detail"
60 android:textColorHint="@color/white"
61 app:hintTextColor="@color/white"
62 app:boxStrokeColor="@color/white"
63 app:layout_constraintTop_toBottomOf="@id/btn_select_image">
64
65 <com.google.android.material.textfield.TextInputEditText
66 android:id="@+id/et_product_name"
67 android:layout_width="match_parent"
68 android:layout_height="wrap_content"
69 android:textColor="@color/white"
70 android:inputType="text" />
71 </com.google.android.material.textfield.TextInputLayout>
72
73 <com.google.android.material.textfield.TextInputLayout
74 android:id="@+id/til_product_price"
75 style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
76 android:layout_width="match_parent"
77 android:layout_height="wrap_content"
78 android:layout_marginTop="8dp"
79 android:hint="@string/price_product_detail"
80 android:textColorHint="@color/white"
81 app:hintTextColor="@color/white"
82 app:boxStrokeColor="@color/white"
83 app:layout_constraintTop_toBottomOf="@id/til_product_name">
84
85 <com.google.android.material.textfield.TextInputEditText
86 android:id="@+id/et_product_price"
87 android:layout_width="match_parent"
88 android:layout_height="wrap_content"
89 android:textColor="@color/white"
90 android:inputType="numberDecimal" />
91 </com.google.android.material.textfield.TextInputLayout>
92
93 <com.google.android.material.textfield.TextInputLayout
94 android:id="@+id/til_product_description"
95 style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
96 android:layout_width="match_parent"
97 android:layout_height="wrap_content"
98 android:layout_marginTop="8dp"
99 android:hint="@string/description_product_detail"
100 android:textColorHint="@color/white"
101 app:hintTextColor="@color/white"
102 app:boxStrokeColor="@color/white"
103 app:layout_constraintTop_toBottomOf="@id/til_product_price">
104
105 <com.google.android.material.textfield.TextInputEditText
106 android:id="@+id/et_product_description"
107 android:layout_width="match_parent"
108 android:layout_height="wrap_content"
109 android:textColor="@color/white"
110 android:inputType="textMultiLine"
111 android:minLines="3" />
112 </com.google.android.material.textfield.TextInputLayout>
113
114 <Button
115 android:id="@+id/btn_save_product"
116 android:layout_width="match_parent"
117 android:layout_height="wrap_content"
118 android:layout_marginTop="24dp"
119 android:text="@string/btn_save_changes"
120 app:layout_constraintTop_toBottomOf="@id/til_product_description" />
121
122 </androidx.constraintlayout.widget.ConstraintLayout>