Add address manager screen

This commit is contained in:
Nezumi
2023-03-06 16:23:47 +07:00
parent 77d8818786
commit c51300e6ef
7 changed files with 349 additions and 1 deletions
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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"
tools:context=".Activity.AddressManagerActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/textView"
android:text="quản lý địa chỉ"
android:fontFamily="@font/bebas"
android:textSize="40sp"
android:textColor="@color/black"
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:listitem="@layout/item_address"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="10dp"
app:layout_constraintTop_toBottomOf="@id/textView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
<Button
android:id="@+id/add_address_button"
android:text="Thêm địa chỉ"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="70dp"
android:layout_marginEnd="70dp"
android:layout_marginTop="30dp"
android:layout_marginBottom="30dp"
app:layout_constraintTop_toBottomOf="@id/recycler_view_address"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
+103
View File
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="5dp"
app:cardUseCompatPadding="true"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="5dp"
>
<TextView
android:id="@+id/text_view_address"
android:text="Hẻm 215, đường Phạm Như Xương, phường Hoà Khánh Nam, quận Liên Chiểu, thành phố Đà Nẵng"
android:textSize="16sp"
android:fontFamily="@font/opensans"
android:textColor="@color/gray"
android:textStyle="italic|bold"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/default_text_view"
android:text="Mặc định"
android:textSize="13sp"
android:fontFamily="@font/opensans"
android:textColor="@color/primaryColor"
android:textStyle="bold"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.6"
android:gravity="center_vertical"
android:visibility="visible"
/>
<TextView
android:id="@+id/blank_text_view"
android:textSize="13sp"
android:fontFamily="@font/opensans"
android:textColor="@color/primaryColor"
android:textStyle="bold"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.6"
android:gravity="center_vertical"
android:visibility="gone"
/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:layout_gravity="center_vertical|right"
>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/edit_button"
android:text="Sửa"
android:textSize="11sp"
android:fontFamily="@font/opensans"
android:backgroundTint="@color/green"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
/>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/delete_button"
android:text="Xoá"
android:textSize="11sp"
android:backgroundTint="@color/primaryColor"
style="@style/ShapeAppearance.FoodifyApp.Button.Rounded"
android:fontFamily="@font/opensans"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>