This commit is contained in:
Gracia
2025-04-12 04:40:19 +07:00
parent e9e3597363
commit 4e82a36cad
7 changed files with 471 additions and 147 deletions

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="@color/black_100"
android:dashWidth="5dp"
android:dashGap="5dp" />
<solid android:color="@color/white" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

View File

@ -69,15 +69,61 @@
</LinearLayout>
<!-- ImageView untuk preview gambar -->
<ImageView
android:id="@+id/iv_preview_foto"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_marginTop="8dp"
android:scaleType="centerCrop"
android:contentDescription="Preview Gambar"
android:src="@drawable/ic_upload"/>
<!-- ViewSwitcher untuk Upload Gambar Produk -->
<ViewSwitcher
android:id="@+id/switcher_foto_produk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="24dp">
<!-- Tampilan saat belum ada gambar di-upload -->
<FrameLayout
android:id="@+id/layout_upload_foto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_upload"
android:gravity="center"
android:padding="13dp">
<ImageView
android:layout_width="44dp"
android:layout_height="44dp"
android:src="@drawable/ic_upload"
android:contentDescription="Ikon Upload" />
</FrameLayout>
<!-- Tampilan saat gambar sudah di-upload -->
<FrameLayout
android:layout_width="70dp"
android:layout_height="70dp"
android:background="@drawable/bg_upload"
android:layout_gravity="center">
<ImageView
android:id="@+id/iv_preview_foto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:contentDescription="Preview Gambar"
android:src="@drawable/placeholder_image"/>
<ImageButton
android:id="@+id/btn_remove_foto"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_gravity="top|end"
android:layout_margin="6dp"
android:elevation="8dp"
android:src="@drawable/ic_close"
android:contentDescription="Hapus Gambar"
android:padding="4dp"
app:tint="@color/white" />
</FrameLayout>
</ViewSwitcher>
</LinearLayout>
@ -245,7 +291,7 @@
android:layout_height="wrap_content"
android:text="Harga Produk"
style="@style/body_medium"
android:layout_marginRight="4dp"/>
android:layout_marginEnd="4dp"/>
<TextView
android:layout_width="0dp"
@ -409,7 +455,8 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/bg_text_field"
android:gravity="center">
android:gravity="center"
android:layout_marginTop="10dp">
<EditText
android:id="@+id/edt_berat_produk"
@ -549,7 +596,6 @@
style="@style/body_medium"
android:layout_marginEnd="4dp"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -567,7 +613,8 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/bg_text_field"
android:gravity="center">
android:gravity="center"
android:layout_marginTop="10dp">
<EditText
android:id="@+id/edt_durasi"
@ -592,6 +639,178 @@
</LinearLayout>
<!-- SPPIRT -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="24dp">
<!-- Label SPPIRT -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="SPPIRT"
style="@style/body_medium"/>
<!-- ViewSwitcher: Switches antara upload box dan uploaded preview SPPIRT -->
<ViewSwitcher
android:id="@+id/switcher_sppirt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<!-- Upload Prompt Layout -->
<FrameLayout
android:id="@+id/layout_upload_sppirt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_upload"
android:padding="20dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:gravity="center">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_upload"
android:contentDescription="Ikon Unggah" />
<TextView
style="@style/body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Unggah dokumen SPPIRT Anda di sini"
android:textColor="@color/black_300"
android:layout_marginTop="8dp"/>
</LinearLayout>
</FrameLayout>
<!-- Uploaded File Preview Layout -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/bg_text_field"
android:gravity="center"
android:layout_marginTop="10dp"
android:padding="8dp">
<TextView
android:id="@+id/tv_sppirt_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="sppirt.pdf"
style="@style/body_small"/>
<ImageButton
android:id="@+id/btn_remove_sppirt"
android:layout_width="12dp"
android:layout_height="12dp"
android:src="@drawable/ic_close"
app:tint="@color/black_300"
android:contentDescription="Hapus unggahan" />
</LinearLayout>
</ViewSwitcher>
</LinearLayout>
<!-- Halal -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="24dp">
<!-- Label Halal -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sertifikasi Halal"
style="@style/body_medium"/>
<!-- ViewSwitcher: Switches antara upload box dan uploaded preview halal -->
<ViewSwitcher
android:id="@+id/switcher_halal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<!-- Upload Prompt Layout -->
<FrameLayout
android:id="@+id/layout_upload_halal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_upload"
android:padding="20dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:gravity="center">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_upload"
android:contentDescription="Ikon Unggah" />
<TextView
style="@style/body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Unggah dokumen Sertifikasi Halal Anda di sini"
android:textColor="@color/black_300"
android:layout_marginTop="8dp"/>
</LinearLayout>
</FrameLayout>
<!-- Uploaded File Preview Layout -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/bg_text_field"
android:gravity="center"
android:layout_marginTop="10dp"
android:padding="8dp">
<TextView
android:id="@+id/tv_halal_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="sppirt.pdf"
style="@style/body_small"/>
<ImageButton
android:id="@+id/btn_remove_halal"
android:layout_width="12dp"
android:layout_height="12dp"
android:src="@drawable/ic_close"
app:tint="@color/black_300"
android:contentDescription="Hapus unggahan" />
</LinearLayout>
</ViewSwitcher>
</LinearLayout>
<!-- Produk Aktif -->
<LinearLayout
android:layout_width="match_parent"