fetch store product

This commit is contained in:
Gracia
2025-04-10 03:21:21 +07:00
parent a21ec50454
commit d11022d502
26 changed files with 441 additions and 38 deletions

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/blue_100" />
<corners android:radius="3dp" />
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/black_100" />
<corners android:radius="3dp" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

View File

@ -2,13 +2,16 @@
<LinearLayout 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:fitsSystemWindows="true"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.profile.mystore.product.AddProductActivity">
<include layout="@layout/header" />
<include
android:id="@+id/header"
layout="@layout/header" />
<ScrollView
android:layout_width="match_parent"

View File

@ -3,13 +3,16 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows="true"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.profile.mystore.balance.BalanceActivity">
<include layout="@layout/header" />
<include
android:id="@+id/header"
layout="@layout/header" />
<LinearLayout
android:id="@+id/layout_balance"

View File

@ -2,13 +2,16 @@
<LinearLayout 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:fitsSystemWindows="true"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.profile.mystore.balance.BalanceTopUpActivity"
android:orientation="vertical">
<include layout="@layout/header" />
<include
android:id="@+id/header"
layout="@layout/header" />
<ScrollView
android:layout_width="match_parent"

View File

@ -2,13 +2,16 @@
<LinearLayout 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:fitsSystemWindows="true"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.profile.mystore.sells.payment.ClaimPaymentActivity">
<include layout="@layout/header" />
<include
android:id="@+id/header"
layout="@layout/header" />
<ScrollView
android:layout_width="match_parent"

View File

@ -2,13 +2,16 @@
<LinearLayout 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:fitsSystemWindows="true"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.profile.mystore.MyStoreActivity">
<include layout="@layout/header" />
<include
android:id="@+id/header"
layout="@layout/header" />
<ScrollView
android:layout_width="match_parent"

View File

@ -1,10 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout 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:fitsSystemWindows="true"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.profile.mystore.product.ProductActivity">
tools:context=".ui.profile.mystore.product.ProductActivity"
android:orientation="vertical">
</androidx.constraintlayout.widget.ConstraintLayout>
<include
android:id="@+id/header"
layout="@layout/header" />
<!-- Search Bar -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:background="@color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:background="@drawable/bg_text_field"
android:paddingHorizontal="6dp"
android:paddingVertical="10dp">
<ImageView
android:layout_width="14dp"
android:layout_height="14dp"
android:src="@drawable/ic_search"
android:contentDescription="Search Icon" />
<EditText
android:id="@+id/edt_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:hint="Cari produk Anda di sini..."
android:inputType="text"
style="@style/body_small"
android:layout_marginStart="6dp"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/black_50"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/layout_product_menu"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_store_product"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
tools:listitem="@layout/item_store_product" />
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
</LinearLayout>
</ScrollView>
</LinearLayout>

View File

@ -2,13 +2,16 @@
<LinearLayout 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:fitsSystemWindows="true"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.profile.mystore.sells.shipment.ShippingConfirmationActivity">
<include layout="@layout/header" />
<include
android:id="@+id/header"
layout="@layout/header" />
<ScrollView
android:layout_width="match_parent"

View File

@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout 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:fitsSystemWindows="true"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout 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:fitsSystemWindows="true"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/horizontal_safe_area">
<!-- Top Section: Image + Info + Menu -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_product"
android:layout_width="95dp"
android:layout_height="70dp"
android:scaleType="centerCrop"
android:src="@drawable/placeholder_image"
app:shapeAppearanceOverlay="@style/store_product_image"
android:contentDescription="Product Image" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="13dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_product_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Jaket Pink Fuschia"
style="@style/label_medium_prominent" />
<TextView
android:id="@+id/tv_product_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Rp150.000"
style="@style/label_medium" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="6dp">
<TextView
android:id="@+id/tv_product_stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stok: 15"
style="@style/label_medium" />
<TextView
android:id="@+id/tv_product_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Aktif"
style="@style/label_small"
android:paddingHorizontal="4dp"
android:textColor="@color/darkblue_500"
android:background="@drawable/bg_product_active" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/ivMenu"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_more_vertical"
android:contentDescription="Menu"
android:layout_marginStart="8dp" />
</LinearLayout>
<!-- Action Buttons -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginTop="12dp">
<Button
style="@style/button.small.secondary.medium"
android:id="@+id/btn_change_price"
android:layout_width="0dp"
android:layout_weight="1"
android:text="Ubah Harga" />
<Space
android:layout_width="10dp"
android:layout_height="0dp" />
<Button
style="@style/button.small.secondary.medium"
android:id="@+id/btn_change_stock"
android:layout_width="0dp"
android:layout_weight="1"
android:text="Ubah Stok" />
</LinearLayout>
</LinearLayout>
<!-- Divider -->
<View
android:layout_width="match_parent"
android:layout_height="8dp"
android:background="@color/black_50"/>
</LinearLayout>

View File

@ -293,4 +293,9 @@
<item name="cornerSize">50%</item>
</style>
<style name="store_product_image">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">5dp</item>
</style>
</resources>