From c6782ec33f69dc123e1a835bc71af24636e50615 Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 4 Mar 2022 15:38:52 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../wallet/ui/wallet/SingleWalletView.kt | 12 +-- .../layout/layout_wallet_short_buttons.xml | 77 +++++++++---------- 2 files changed, 44 insertions(+), 45 deletions(-) diff --git a/app/src/main/java/com/tangem/tap/features/wallet/ui/wallet/SingleWalletView.kt b/app/src/main/java/com/tangem/tap/features/wallet/ui/wallet/SingleWalletView.kt index 84d2795401..224f717a2a 100644 --- a/app/src/main/java/com/tangem/tap/features/wallet/ui/wallet/SingleWalletView.kt +++ b/app/src/main/java/com/tangem/tap/features/wallet/ui/wallet/SingleWalletView.kt @@ -128,7 +128,7 @@ class SingleWalletView : WalletView { val btnConfirm = if (state.tradeCryptoState.sellingAllowed || state.tradeCryptoState.buyingAllowed ) { - lButtonsShort.btnConfirmShort + lButtonsShort.btnConfirm } else { lButtonsLong.btnConfirmLong } @@ -136,7 +136,7 @@ class SingleWalletView : WalletView { val btnScan = if (state.tradeCryptoState.sellingAllowed || state.tradeCryptoState.buyingAllowed ) { - lButtonsShort.btnScanShort + lButtonsShort.btnScan } else { lButtonsLong.btnScanLong } @@ -175,14 +175,14 @@ class SingleWalletView : WalletView { else -> R.string.wallet_button_trade } val icon = when { - allowedToBuy && !allowedToSell -> R.drawable.ic_arrow_up_short_btn - !allowedToBuy && allowedToSell -> R.drawable.ic_arrow_down_short_button - allowedToBuy && allowedToSell -> R.drawable.ic_arrows_up_down_short_btn + allowedToBuy && !allowedToSell -> R.drawable.ic_arrow_up + !allowedToBuy && allowedToSell -> R.drawable.ic_arrow_down + allowedToBuy && allowedToSell -> R.drawable.ic_arrows_up_down else -> null } with(binding) { lButtonsShort.btnTrade.text = fragment?.getText(text) - lButtonsShort.btnTrade.setCompoundDrawablesWithIntrinsicBounds(0, icon ?: 0, 0, 0) + icon?.let { lButtonsShort.btnTrade.setIconResource(it) } lButtonsShort.btnTrade.setOnClickListener { if (action != null) store.dispatch(action) } } } diff --git a/app/src/main/res/layout/layout_wallet_short_buttons.xml b/app/src/main/res/layout/layout_wallet_short_buttons.xml index 09318739b7..08bdfeef5a 100644 --- a/app/src/main/res/layout/layout_wallet_short_buttons.xml +++ b/app/src/main/res/layout/layout_wallet_short_buttons.xml @@ -6,58 +6,57 @@ - - + + + + \ No newline at end of file