Add profile page

This commit is contained in:
Nezumi
2023-02-28 11:46:07 +07:00
parent 85725262a9
commit 990338f445
6 changed files with 242 additions and 12 deletions
@@ -1,5 +0,0 @@
<vector android:height="18dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="18dp" 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>
+7
View File
@@ -0,0 +1,7 @@
<vector android:height="32dp" android:viewportHeight="22"
android:viewportWidth="22" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<group>
<clip-path android:pathData="M0,0h22v22h-22z"/>
<path android:fillColor="#2D2D2D" android:pathData="M4.583,20.167C4.34,20.167 4.107,20.07 3.935,19.898C3.763,19.726 3.667,19.493 3.667,19.25V2.75C3.667,2.507 3.763,2.274 3.935,2.102C4.107,1.93 4.34,1.833 4.583,1.833H17.417C17.66,1.833 17.893,1.93 18.065,2.102C18.237,2.274 18.333,2.507 18.333,2.75V5.5H16.5V3.667H5.5V18.333H16.5V16.5H18.333V19.25C18.333,19.493 18.237,19.726 18.065,19.898C17.893,20.07 17.66,20.167 17.417,20.167H4.583ZM16.5,14.667V11.917H10.083V10.083H16.5V7.333L21.083,11L16.5,14.667Z"/>
</group>
</vector>
@@ -0,0 +1,7 @@
<vector android:height="32dp" android:viewportHeight="22"
android:viewportWidth="22" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<group>
<clip-path android:pathData="M0,0h22v22h-22z"/>
<path android:fillColor="#2D2D2D" android:pathData="M11,1.833C16.063,1.833 20.167,5.937 20.167,11C20.167,16.063 16.063,20.167 11,20.167C5.937,20.167 1.833,16.063 1.833,11H3.667C3.667,15.05 6.95,18.333 11,18.333C15.05,18.333 18.333,15.05 18.333,11C18.333,6.95 15.05,3.667 11,3.667C8.479,3.667 6.255,4.938 4.936,6.875H7.333V8.708H1.833V3.208H3.667V5.5C5.339,3.272 8.002,1.833 11,1.833ZM11.917,6.417V10.62L14.889,13.592L13.592,14.889L10.083,11.379V6.417H11.917Z"/>
</group>
</vector>
+7
View File
@@ -0,0 +1,7 @@
<vector android:height="32dp" android:viewportHeight="22"
android:viewportWidth="22" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<group>
<clip-path android:pathData="M0,0h22v22h-22z"/>
<path android:fillColor="#2D2D2D" android:pathData="M5.879,14.667L15.176,5.37L13.88,4.074L4.583,13.37V14.667H5.879ZM6.639,16.5H2.75V12.611L13.232,2.128C13.404,1.957 13.637,1.86 13.88,1.86C14.123,1.86 14.356,1.957 14.528,2.128L17.122,4.722C17.293,4.894 17.39,5.127 17.39,5.37C17.39,5.613 17.293,5.846 17.122,6.018L6.639,16.5ZM2.75,18.333H19.25V20.167H2.75V18.333Z"/>
</group>
</vector>
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

+221 -7
View File
@@ -1,21 +1,235 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".Fragment.ProfileFragment">
<TextView
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/profile_page"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="50dp"
android:text="Fragment Profile"/>
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:visibility="gone"
>
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/profile_avatar"
android:src="@drawable/profile_avatar"
app:riv_corner_radius="180dp"
android:layout_width="100dp"
android:layout_height="100dp"
android:scaleType="centerCrop"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
<TextView
android:id="@+id/user_name"
android:text="User Name"
android:textColor="@color/black"
android:textSize="25sp"
android:fontFamily="@font/opensans"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
app:layout_constraintTop_toBottomOf="@id/profile_avatar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
<LinearLayout
android:id="@+id/account_and_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="90dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
app:layout_constraintTop_toBottomOf="@id/user_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/ic_pencil"
android:src="@drawable/pencil"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="ContentDescription"
app:tint="@color/primaryColor"
/>
<TextView
android:text="Account and Profile"
android:textSize="18sp"
android:fontFamily="@font/opensans"
android:textColor="@color/black"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="12dp"
tools:ignore="HardcodedText"
android:layout_weight="1"
/>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:rotation="180"
android:src="@drawable/back_button"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:id="@+id/manage_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
app:layout_constraintTop_toBottomOf="@id/account_and_profile"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/ic_location"
android:src="@drawable/location"
android:layout_width="32dp"
android:layout_height="32dp"
tools:ignore="ContentDescription"
app:tint="@color/primaryColor"
/>
<TextView
android:text="Manage Address"
android:textSize="18sp"
android:fontFamily="@font/opensans"
android:textColor="@color/black"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="12dp"
tools:ignore="HardcodedText"
android:layout_weight="1"
/>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:rotation="180"
android:src="@drawable/back_button"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:id="@+id/order_history"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
app:layout_constraintTop_toBottomOf="@id/manage_address"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/ic_order_history"
android:src="@drawable/order_history"
android:layout_width="32dp"
android:layout_height="32dp"
tools:ignore="ContentDescription"
app:tint="@color/primaryColor"
/>
<TextView
android:text="Order History"
android:textSize="18sp"
android:fontFamily="@font/opensans"
android:textColor="@color/black"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="12dp"
tools:ignore="HardcodedText"
android:layout_weight="1"
/>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:rotation="180"
android:src="@drawable/back_button"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:id="@+id/log_out"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
app:layout_constraintTop_toBottomOf="@id/order_history"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/ic_log_out"
android:src="@drawable/logout"
android:layout_width="32dp"
android:layout_height="32dp"
tools:ignore="ContentDescription"
app:tint="@color/primaryColor"
/>
<TextView
android:text="Log out"
android:textSize="18sp"
android:fontFamily="@font/opensans"
android:textColor="@color/black"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="12dp"
tools:ignore="HardcodedText"
android:layout_weight="1"
/>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:rotation="180"
android:src="@drawable/back_button"
tools:ignore="ContentDescription" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:id="@+id/sign_up_button"
android:layout_marginTop="100dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sign in" />
android:text="Sign in"
tools:ignore="MissingConstraints" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>