Merge remote-tracking branch 'origin/ui-design' into feat/general-cart-and-payment
This commit is contained in:
commit
a33c0c97bd
@ -129,7 +129,7 @@ public class ShoppingCartFragment extends FragmentAbstract {
|
||||
}
|
||||
getActivity().runOnUiThread(() -> {
|
||||
if (binding != null && binding.cancelText != null) {
|
||||
binding.cancelText.setText(getString(R.string.cancel_button_format, seconds));
|
||||
binding.cancelText.setText(getString(R.string.cart_cancel_button_format, seconds));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:background="@color/background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 購物車上方商品數量 -->
|
||||
@ -27,110 +27,137 @@
|
||||
android:layout_weight="1"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#B6B6B6" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/summaryContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:gravity="center|end"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="100dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="小記"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="26sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalAmountTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/total_amount_format"
|
||||
android:textColor="@color/primary"
|
||||
android:textSize="52sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
app:cardBackgroundColor="@color/cardSurface"
|
||||
app:cardElevation="16dp"
|
||||
app:cardCornerRadius="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_height="200dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 左側區域 (繼續選購、清空購物車按鈕) -->
|
||||
<LinearLayout
|
||||
android:id="@+id/addMoreItemsButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#D1D1D1"
|
||||
android:gravity="center">
|
||||
android:layout_weight="4"
|
||||
android:gravity="bottom|center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="20dp"
|
||||
android:gravity="center"
|
||||
android:padding="4dp"
|
||||
android:text="@string/add_more_items"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="46sp"
|
||||
android:textStyle="bold" />
|
||||
<!-- 繼續選購 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/addMoreItemsButton"
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardBackgroundColor="@color/light_gray"
|
||||
app:cardElevation="4dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@string/cart_add_more_items"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 清空購物車 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cancelButton"
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="64dp"
|
||||
app:cardBackgroundColor="@color/warning"
|
||||
app:cardElevation="4dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancelText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@string/cart_cancel"
|
||||
android:textColor="@color/onWarning"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右側區域 (小記、前往結帳按鈕) -->
|
||||
<LinearLayout
|
||||
android:id="@+id/confirmButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#0060E2"
|
||||
android:gravity="center">
|
||||
android:layout_weight="6"
|
||||
android:gravity="bottom|center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="30dp"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<!-- 佔位 View,將小記與按鈕推到下方 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- 付款金額 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/summaryContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="20dp"
|
||||
android:gravity="center"
|
||||
android:padding="4dp"
|
||||
android:text="@string/go_to_pay"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="46sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
android:gravity="bottom|end"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/cancelButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#000000"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="付款金額"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="26sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancelText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="20dp"
|
||||
android:gravity="center"
|
||||
android:padding="4dp"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="46sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/totalAmountTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/total_amount_format"
|
||||
android:textColor="@color/primary"
|
||||
android:textSize="52sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 前往結帳 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/confirmButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
app:cardBackgroundColor="@color/primary"
|
||||
app:cardElevation="4dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/go_to_pay"
|
||||
android:textColor="@color/onPrimary"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
|
||||
@ -77,6 +77,7 @@
|
||||
android:layout_height="44dp"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/bg_quantity_outline_button"
|
||||
android:elevation="4dp"
|
||||
android:src="@drawable/remove_24" />
|
||||
|
||||
<TextView
|
||||
@ -94,6 +95,7 @@
|
||||
android:layout_height="44dp"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/bg_quantity_outline_button"
|
||||
android:elevation="4dp"
|
||||
android:src="@drawable/add_24" />
|
||||
</LinearLayout>
|
||||
|
||||
@ -105,6 +107,7 @@
|
||||
android:layout_marginStart="32dp"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/bg_waste_outline_button"
|
||||
android:elevation="4dp"
|
||||
android:src="@drawable/close_warning_24" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -406,6 +406,9 @@
|
||||
<!-- Multi-item shopping cart (merged from General flavor) -->
|
||||
<string name="shopping_cart_title">Shopping Cart</string>
|
||||
<string name="add_more_items">Add More Items</string>
|
||||
<string name="cart_add_more_items">Continue Shopping</string>
|
||||
<string name="cart_cancel">Clear Cart</string>
|
||||
<string name="cart_cancel_button_format">Clear Cart %d sec</string>
|
||||
<string name="go_to_pay">Proceed to Checkout</string>
|
||||
<string name="cancel_button_format">Cancel (%d sec)</string>
|
||||
<string name="total_items_format">Cart Items (%d)</string>
|
||||
|
||||
@ -408,6 +408,9 @@
|
||||
<!-- 多品項購物車(merged from General flavor) -->
|
||||
<string name="shopping_cart_title">ショッピングカート</string>
|
||||
<string name="add_more_items">商品を追加</string>
|
||||
<string name="cart_add_more_items">買い物を続ける</string>
|
||||
<string name="cart_cancel">カートを空にする</string>
|
||||
<string name="cart_cancel_button_format">カートを空にする %d秒</string>
|
||||
<string name="go_to_pay">お会計へ進む</string>
|
||||
<string name="cancel_button_format">キャンセル(%d秒)</string>
|
||||
<string name="total_items_format">商品数(%d個)</string>
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
═══════════════════════════════════════════ -->
|
||||
<color name="black">#272727</color> <!-- 主要文字、邊框 -->
|
||||
<color name="white">#FFFFFF</color> <!-- 背景、反色文字 -->
|
||||
<color name="light_gray">#A9A9A9</color> <!-- 停用狀態 -->
|
||||
<color name="gray">#CCCCCC</color> <!-- 邊框、分隔線 -->
|
||||
<color name="light_gray">#E4E4E4</color> <!-- 停用狀態 -->
|
||||
<color name="gray">#ADADAD</color> <!-- 邊框、分隔線 -->
|
||||
<color name="red">#FFFF0000</color> <!-- 警示/刪除(fragment_shopping_cart 等沿用) -->
|
||||
|
||||
<!-- ═══════════════════════════════════════════
|
||||
@ -51,4 +51,4 @@
|
||||
<color name="cardSurface">#FFFFFF</color> <!-- 卡片、對話框(與背景形成層次區隔) -->
|
||||
<color name="outline">#73777F</color> <!-- 邊框線 -->
|
||||
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@ -325,6 +325,9 @@
|
||||
<!-- 多品項購物車(原 General flavor strings,合併進 main) -->
|
||||
<string name="shopping_cart_title">購物車</string>
|
||||
<string name="add_more_items">加購商品</string>
|
||||
<string name="cart_add_more_items">繼續選購</string>
|
||||
<string name="cart_cancel">清空購物車</string>
|
||||
<string name="cart_cancel_button_format">清空購物車 %d秒</string>
|
||||
<string name="go_to_pay">前往結帳</string>
|
||||
<string name="cancel_button_format">取消(%d秒)</string>
|
||||
<string name="total_items_format">購物車品項(%d件)</string>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user