mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-08-14 02:52:22 +00:00
add complaint (in dialog)
This commit is contained in:
11
app/src/main/res/drawable/bg_dashboard_border.xml
Normal file
11
app/src/main/res/drawable/bg_dashboard_border.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="#BCBCBC"
|
||||
android:dashWidth="10dp"
|
||||
android:dashGap="6dp" />
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="#F5F5F5" />
|
||||
</shape>
|
103
app/src/main/res/layout/dialog_cancel_order.xml
Normal file
103
app/src/main/res/layout/dialog_cancel_order.xml
Normal file
@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView 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"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/cancel_order_confirmation"
|
||||
android:textAlignment="center"
|
||||
android:fontFamily="@font/dmsans_semibold"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/tilCancelReason"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:hint="@string/reason_for_cancellation">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/spinnerCancelReason"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none"
|
||||
android:focusable="false" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Image Upload Section -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/upload_evidence"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:fontFamily="@font/dmsans_medium"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivComplaintImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@drawable/bg_dashboard_border"
|
||||
android:contentDescription="@string/complaint_image" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSelectImage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/tap_to_select_image"
|
||||
android:drawableTop="@drawable/baseline_upload_file_24"
|
||||
android:drawablePadding="8dp"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnCancelDialog"
|
||||
style="@style/RoundedBorderStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/dmsans_semibold"
|
||||
android:textColor="@color/blue_500"
|
||||
android:text="@string/cancel" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnConfirmCancel"
|
||||
style="@style/RoundedBorderStyleFilled"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/dmsans_semibold"
|
||||
android:text="@string/confirm" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
@ -93,5 +93,29 @@
|
||||
<string name="claim_order">Pesanan Diterima </string>
|
||||
<string name="add_review">Beri Ulasan </string>
|
||||
|
||||
<string name="warning_icon">Warning Icon</string>
|
||||
<string name="cancel_order_confirmation">Apakah anda yakin ingin membatalkan pesanan?</string>
|
||||
<string name="reason_for_cancellation">Alasan Batalkan Pesanan</string>
|
||||
<string name="cancel">Kembali</string>
|
||||
<string name="confirm">Batalkan Pesanan</string>
|
||||
<string name="order_canceled_successfully">Order canceled successfully</string>
|
||||
<string name="failed_to_cancel_order">Failed to cancel order</string>
|
||||
<string name="please_select_cancellation_reason">Please select a reason for cancellation</string>
|
||||
<string name="upload_evidence">Unggah Bukti Komplain</string>
|
||||
<string name="complaint_image">Complaint evidence image</string>
|
||||
<string name="tap_to_select_image">Tekan untuk unggah foto</string>
|
||||
<string name="please_select_image">Please select an image as evidence</string>
|
||||
<string name="image_too_large">Image is too large. Please select a smaller image.</string>
|
||||
|
||||
<!-- Cancellation Reasons -->
|
||||
<string-array name="cancellation_reasons">
|
||||
<item>Found a better price elsewhere</item>
|
||||
<item>Changed my mind about the product</item>
|
||||
<item>Ordered the wrong item</item>
|
||||
<item>Shipping time is too long</item>
|
||||
<item>Financial reasons</item>
|
||||
<item>Other reason</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
</resources>
|
@ -7,4 +7,22 @@
|
||||
<item name="android:padding">12dp</item>
|
||||
<!-- Add more style attributes as needed -->
|
||||
</style>
|
||||
|
||||
<style name="RoundedBorderStyle">
|
||||
<!-- This style can be applied to views -->
|
||||
<!-- <item name="android:background">@drawable/bg_button_outline</item>-->
|
||||
<item name="strokeColor">@color/blue_500</item>
|
||||
<item name="strokeWidth">2dp</item>
|
||||
<item name="cornerRadius">8dp</item>
|
||||
<item name="backgroundTint">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="RoundedBorderStyleFilled">
|
||||
<!-- This style can be applied to views -->
|
||||
<!-- <item name="android:background">@drawable/bg_button_outline</item>-->
|
||||
<item name="strokeColor">@color/blue_500</item>
|
||||
<item name="strokeWidth">2dp</item>
|
||||
<item name="cornerRadius">8dp</item>
|
||||
<item name="backgroundTint">@color/blue_500</item>
|
||||
</style>
|
||||
</resources>
|
Reference in New Issue
Block a user