mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Fix layout address manager
This commit is contained in:
@@ -4,6 +4,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -58,7 +59,7 @@ public class AddressAdapter extends RecyclerView.Adapter<AddressAdapter.AddressV
|
||||
public class AddressViewHolder extends RecyclerView.ViewHolder{
|
||||
|
||||
private TextView text_view_address, default_text_view, blank_text_view;
|
||||
private Button edit_btn, delete_btn;
|
||||
private ImageView edit_btn, delete_btn;
|
||||
|
||||
public AddressViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<vector android:height="32dp" android:tint="#FFFFFF"
|
||||
<vector android:height="24dp" android:tint="#FF3333"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
|
||||
</vector>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#90E861"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
|
||||
</vector>
|
||||
@@ -35,6 +35,108 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="5dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:id="@+id/address_default"
|
||||
>
|
||||
|
||||
<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"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/baseline_edit_24"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/edit_button"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/delete_button"
|
||||
android:src="@drawable/baseline_delete_24"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@color/grayLight"
|
||||
app:layout_constraintTop_toBottomOf="@id/address_default"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_address"
|
||||
android:layout_width="match_parent"
|
||||
@@ -43,7 +145,7 @@
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView"
|
||||
app:layout_constraintTop_toBottomOf="@id/address_default"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
@@ -37,20 +37,6 @@
|
||||
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"
|
||||
@@ -61,7 +47,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.6"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
@@ -71,24 +56,18 @@
|
||||
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"
|
||||
<ImageView
|
||||
android:src="@drawable/baseline_edit_24"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/edit_button"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
<ImageView
|
||||
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:src="@drawable/baseline_delete_24"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
|
||||
Reference in New Issue
Block a user