update payment and add evidence

This commit is contained in:
shaulascr
2025-05-29 16:39:50 +07:00
committed by Gracia Hotmauli
parent 7d9f2b4d2f
commit 968292a35a
13 changed files with 862 additions and 171 deletions

View File

@ -0,0 +1,178 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.product.category.CategoryProductsActivity">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="200dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleMarginStart="48dp"
app:expandedTitleMarginEnd="64dp">
<ImageView
android:id="@+id/iv_category_header"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
app:layout_collapseMode="parallax"
android:contentDescription="Category Header Image" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blue_50" />
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Category Title Section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/tv_category_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Category Name"
android:textSize="24sp"
android:textStyle="bold"
android:textColor="@color/black_500"
android:gravity="center" />
<View
android:layout_width="60dp"
android:layout_height="3dp"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:background="@color/blue_500" />
</LinearLayout>
<!-- Products Section -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp">
<!-- Loading State -->
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="32dp"
android:visibility="gone" />
<!-- Products RecyclerView -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_products"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:clipToPadding="false"
tools:listitem="@layout/item_product_grid" />
<!-- Empty State -->
<LinearLayout
android:id="@+id/layout_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:padding="32dp"
android:gravity="center"
android:visibility="gone">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/baseline_search_24"
android:layout_marginBottom="16dp"
android:contentDescription="No Products" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="No products found in this category"
android:textSize="16sp"
android:textColor="@color/black_200"
android:gravity="center" />
</LinearLayout>
<!-- Error State -->
<LinearLayout
android:id="@+id/layout_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:padding="32dp"
android:gravity="center"
android:visibility="gone">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/baseline_alarm_24"
android:layout_marginBottom="16dp"
android:contentDescription="Error" />
<TextView
android:id="@+id/tv_error_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Something went wrong"
android:textSize="16sp"
android:textColor="@color/black_200"
android:gravity="center"
android:layout_marginBottom="16dp" />
<Button
android:id="@+id/btn_retry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Retry"
style="@style/Widget.MaterialComponents.Button.OutlinedButton" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -230,7 +230,20 @@
android:background="@drawable/bg_button_filled"
android:text="Kirim Bukti Bayar"
android:textAllCaps="false"
android:textColor="@android:color/white" />
android:textColor="@android:color/white"
android:enabled="true"
android:clickable="true"
android:focusable="true" />
</LinearLayout>
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,67 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.cardview.widget.CardView 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="wrap_content"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="2dp">
app:cardCornerRadius="12dp"
app:cardElevation="4dp"
android:foreground="?android:attr/selectableItemBackground">
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Product Image -->
<ImageView
android:id="@+id/productImage"
android:id="@+id/iv_product_image"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="160dp"
android:scaleType="centerCrop"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintTop_toTopOf="parent"
android:background="@color/light_gray"
android:contentDescription="Product Image"
tools:src="@drawable/placeholder_image" />
<TextView
android:id="@+id/productName"
<!-- Product Info -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:maxLines="2"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/productImage"
tools:text="Product Name" />
android:orientation="vertical"
android:padding="12dp">
<TextView
android:id="@+id/storeName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textSize="12sp"
android:fontFamily="@font/dmsans_medium"
app:layout_constraintTop_toBottomOf="@id/productName"
tools:text="Store Name" />
<!-- Product Name -->
<TextView
android:id="@+id/tv_product_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Product Name"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="@color/black_500"
android:maxLines="2"
android:ellipsize="end"
tools:text="Sample Product Name" />
<TextView
android:id="@+id/productPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:textColor="@color/blue1"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/storeName"
tools:text="Rp 150.000" />
<!-- Product Price -->
<TextView
android:id="@+id/tv_product_price"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="Rp 0"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/blue_500"
tools:text="Rp 25,000" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<!-- Stock Status -->
<TextView
android:id="@+id/tv_stock_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="Stock: 0"
android:textSize="12sp"
android:textColor="@color/black_200"
tools:text="Stock: 15" />
<TextView
android:id="@+id/tv_store_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="Toko Jaya"
android:fontFamily="@font/dmsans_semibold"
android:textSize="14sp"
android:textColor="@color/black_200"
tools:text="Stock: 15" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@ -42,6 +42,8 @@
<color name="soft_gray">#7D8FAB</color>
<color name="blue1">#489EC6</color>
<color name="yellow">#faf069</color>
<color name="green">#A5C882</color>
<color name="red">#EC4E20</color>
<color name="bottom_navigation_icon_color_active">#489EC6</color>
<color name="bottom_navigation_icon_color_inactive">#8E8E8E</color>