feat(app-ui): 接部位 B1/B4(取貨碼/購物車浮動鈕) + M1~M5(各支付進行中示意圖)
- 浮動鈕/示意圖 ImageView 補 id(imgFloatPickupCode/imgFloatShoppingCart/imgPayMethod) - M1 NfcCard / M2 NfcPhone / M3 EsunPay(imageCheckout) / M4 NfcRecharge / M5 CashPayDialogGeneral(工廠實際選用) - 注意:nfc_card/phone/recharge 的 imageCheckout 是通道圖非示意圖,故另補 imgPayMethod - UiSkin.apply 套後台圖時清 setImageTintList(null),避免浮動鈕被 app:tint 染色 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5c4ac16d48
commit
9e78119c0a
@ -944,6 +944,9 @@ public class FontendActivity extends AppCompatActivityAbstract implements SaleFl
|
||||
com.unibuy.smartdevice.ui.tools.UiSkin.applyBackground("BG0", binding.container);
|
||||
com.unibuy.smartdevice.ui.tools.UiSkin.applyBgColor("C0", binding.machineInfoBar);
|
||||
com.unibuy.smartdevice.ui.tools.UiSkin.applyTextColor("T0", binding.textMachineInfoName);
|
||||
// 浮動鈕 icon(套後台圖時 UiSkin.apply 會一併清掉 XML 的 app:tint,避免整片被染色)
|
||||
com.unibuy.smartdevice.ui.tools.UiSkin.apply("B1", binding.imgFloatPickupCode); // 取貨碼
|
||||
com.unibuy.smartdevice.ui.tools.UiSkin.apply("B4", binding.imgFloatShoppingCart); // 購物車
|
||||
}
|
||||
|
||||
private void switchLanguage(String languageCode) {
|
||||
|
||||
@ -150,6 +150,9 @@ public class CashPayDialogGeneral extends DialogAbstract {
|
||||
binding = DialogCheckoutCashPayBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
// M5 現金支付示意圖(後台「UI元素設定」,未設定則保留預設圖)
|
||||
com.unibuy.smartdevice.ui.tools.UiSkin.apply("M5", binding.imgPayMethod);
|
||||
|
||||
fourthValueDecimal = 0;
|
||||
|
||||
OrderAmount = Integer.parseInt(String.valueOf(getTotalPrice()));
|
||||
|
||||
@ -176,6 +176,10 @@ public class CheckoutEsunPayDialog extends DialogAbstract {
|
||||
protected void onCreate(Context context) {
|
||||
binding = DialogCheckoutEsunPayBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
// M3 掃碼支付示意圖(此檔的 imageCheckout 才是示意圖;未設定則保留預設圖)
|
||||
com.unibuy.smartdevice.ui.tools.UiSkin.apply("M3", binding.imageCheckout);
|
||||
|
||||
openBarcode = true;
|
||||
isTransaction = true;
|
||||
isChangeDispatch = true;
|
||||
|
||||
@ -198,6 +198,9 @@ public class CheckoutNfcCardDialog extends DialogAbstract {
|
||||
binding = DialogCheckoutNfcCardBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
// M1 信用卡支付示意圖(後台「UI元素設定」,未設定則保留預設圖)
|
||||
com.unibuy.smartdevice.ui.tools.UiSkin.apply("M1", binding.imgPayMethod);
|
||||
|
||||
isResponse = true;
|
||||
isChangeDispatch = true;
|
||||
httpAPI = new HttpAPI(getHandlerMain());
|
||||
|
||||
@ -199,6 +199,9 @@ public class CheckoutNfcPhoneDialog extends DialogAbstract {
|
||||
binding = DialogCheckoutNfcPhoneBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
// M2 手機支付示意圖(後台「UI元素設定」,未設定則保留預設圖)
|
||||
com.unibuy.smartdevice.ui.tools.UiSkin.apply("M2", binding.imgPayMethod);
|
||||
|
||||
isResponse = true;
|
||||
isChangeDispatch = true;
|
||||
httpAPI = new HttpAPI(getHandlerMain());
|
||||
|
||||
@ -198,6 +198,9 @@ public class CheckoutNfcRechargeDialog extends DialogAbstract {
|
||||
binding = DialogCheckoutNfcRechargeBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
// M4 卡片/電子票證示意圖(後台「UI元素設定」,未設定則保留預設圖)
|
||||
com.unibuy.smartdevice.ui.tools.UiSkin.apply("M4", binding.imgPayMethod);
|
||||
|
||||
isResponse = true;
|
||||
isChangeDispatch = true;
|
||||
httpAPI = new HttpAPI(getHandlerMain());
|
||||
|
||||
@ -97,6 +97,13 @@ public class UiSkin {
|
||||
return;
|
||||
}
|
||||
|
||||
// 要套後台圖時清掉 XML 的 tint(如浮動鈕 icon 有 app:tint 會把圖整片染色);
|
||||
// 無 tint 的部位設 null 為 no-op,不受影響。
|
||||
try {
|
||||
imageView.setImageTintList(null);
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
|
||||
try {
|
||||
new ImageGlide(imageView.getContext()).fileload(url, imageView);
|
||||
} catch (Exception ignore) {
|
||||
|
||||
@ -376,6 +376,7 @@
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgFloatPickupCode"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/package_24"
|
||||
@ -434,6 +435,7 @@
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgFloatShoppingCart"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/shopping_cart_24"
|
||||
|
||||
@ -181,6 +181,7 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgPayMethod"
|
||||
android:paddingHorizontal="50dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -109,6 +109,7 @@
|
||||
app:srcCompat="@drawable/checkout_wait" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgPayMethod"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="100dp"
|
||||
|
||||
@ -109,6 +109,7 @@
|
||||
app:srcCompat="@drawable/checkout_wait" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgPayMethod"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="100dp"
|
||||
|
||||
@ -109,6 +109,7 @@
|
||||
app:srcCompat="@drawable/checkout_wait" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgPayMethod"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="100dp"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user