Skip to content

Commit ab36f9a

Browse files
committed
Update wallet title
1 parent 842ca11 commit ab36f9a

File tree

11 files changed

+49
-49
lines changed

11 files changed

+49
-49
lines changed

app/src/main/java/one/mixin/android/ui/address/page/TransferDestinationInputPage.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,6 @@ fun TransferDestinationInputPage(
158158
else -> stringResource(R.string.Privacy_Wallet)
159159
}
160160
Row(verticalAlignment = Alignment.CenterVertically) {
161-
if (name == null && web3Token == null) { // Privacy Wallet
162-
Icon(
163-
painter = painterResource(id = R.drawable.ic_wallet_privacy),
164-
contentDescription = null,
165-
tint = Color.Unspecified,
166-
modifier = Modifier.size(12.dp)
167-
)
168-
Spacer(modifier = Modifier.width(4.dp))
169-
}
170161
Text(
171162
text = subtitleText,
172163
fontSize = 12.sp,
@@ -175,6 +166,15 @@ fun TransferDestinationInputPage(
175166
maxLines = 1,
176167
overflow = TextOverflow.Ellipsis
177168
)
169+
if (name == null && web3Token == null) { // Privacy Wallet
170+
Spacer(modifier = Modifier.width(4.dp))
171+
Icon(
172+
painter = painterResource(id = R.drawable.ic_wallet_privacy),
173+
contentDescription = null,
174+
tint = Color.Unspecified,
175+
modifier = Modifier.size(12.dp)
176+
)
177+
}
178178
}
179179
},
180180
verticalScrollable = false,

app/src/main/java/one/mixin/android/ui/home/web3/swap/SwapOrderDetailPage.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,6 @@ fun SwapOrderDetailPage(
9797
walletDisplayName ?: stringResource(id = R.string.Common_Wallet)
9898
}
9999
Row(verticalAlignment = Alignment.CenterVertically) {
100-
if (walletId == null) {
101-
Icon(
102-
painter = painterResource(id = R.drawable.ic_wallet_privacy),
103-
contentDescription = null,
104-
tint = Color.Unspecified,
105-
modifier = Modifier.size(12.dp)
106-
)
107-
Spacer(modifier = Modifier.width(4.dp))
108-
}
109100
Text(
110101
text = text,
111102
fontSize = 12.sp,
@@ -114,6 +105,15 @@ fun SwapOrderDetailPage(
114105
maxLines = 1,
115106
overflow = TextOverflow.Ellipsis
116107
)
108+
if (walletId == null) {
109+
Spacer(modifier = Modifier.width(4.dp))
110+
Icon(
111+
painter = painterResource(id = R.drawable.ic_wallet_privacy),
112+
contentDescription = null,
113+
tint = Color.Unspecified,
114+
modifier = Modifier.size(12.dp)
115+
)
116+
}
117117
}
118118
},
119119
pop = pop,

app/src/main/java/one/mixin/android/ui/home/web3/swap/SwapOrderListPage.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,6 @@ fun SwapOrderListPage(
9393
walletDisplayName ?: stringResource(id = R.string.Common_Wallet)
9494
}
9595
Row(verticalAlignment = Alignment.CenterVertically) {
96-
if (walletId == null) {
97-
Icon(
98-
painter = painterResource(id = R.drawable.ic_wallet_privacy),
99-
contentDescription = null,
100-
tint = Color.Unspecified,
101-
modifier = Modifier.size(12.dp)
102-
)
103-
Spacer(modifier = Modifier.width(4.dp))
104-
}
10596
Text(
10697
text = text,
10798
fontSize = 12.sp,
@@ -110,6 +101,15 @@ fun SwapOrderListPage(
110101
maxLines = 1,
111102
overflow = TextOverflow.Ellipsis
112103
)
104+
if (walletId == null) {
105+
Spacer(modifier = Modifier.width(4.dp))
106+
Icon(
107+
painter = painterResource(id = R.drawable.ic_wallet_privacy),
108+
contentDescription = null,
109+
tint = Color.Unspecified,
110+
modifier = Modifier.size(12.dp)
111+
)
112+
}
113113
}
114114
},
115115
pop = pop,

app/src/main/java/one/mixin/android/ui/home/web3/swap/SwapPage.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,6 @@ fun SwapPage(
212212
walletDisplayName ?: stringResource(id = R.string.Common_Wallet)
213213
}
214214
Row(verticalAlignment = Alignment.CenterVertically) {
215-
if (walletId == null) {
216-
Icon(
217-
painter = painterResource(id = R.drawable.ic_wallet_privacy),
218-
contentDescription = null,
219-
tint = Color.Unspecified,
220-
modifier = Modifier.size(12.dp)
221-
)
222-
Spacer(modifier = Modifier.width(4.dp))
223-
}
224215
Text(
225216
text = text,
226217
fontSize = 12.sp,
@@ -229,6 +220,15 @@ fun SwapPage(
229220
maxLines = 1,
230221
overflow = TextOverflow.Ellipsis
231222
)
223+
if (walletId == null) {
224+
Spacer(modifier = Modifier.width(4.dp))
225+
Icon(
226+
painter = painterResource(id = R.drawable.ic_wallet_privacy),
227+
contentDescription = null,
228+
tint = Color.Unspecified,
229+
modifier = Modifier.size(12.dp)
230+
)
231+
}
232232
}
233233
},
234234
verticalScrollable = true,

app/src/main/java/one/mixin/android/ui/wallet/components/WalletLabel.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ fun WalletLabel(
4040
) {
4141
Column(horizontalAlignment = Alignment.CenterHorizontally) {
4242
Row(verticalAlignment = Alignment.CenterVertically) {
43+
Text(
44+
text = walletName ?: stringResource(id = R.string.Privacy_Wallet),
45+
color = Color.White,
46+
fontSize = 14.sp
47+
)
4348
if (!isWeb3) {
4449
Icon(
4550
painter = painterResource(id = R.drawable.ic_wallet_privacy_white),
@@ -49,11 +54,6 @@ fun WalletLabel(
4954
)
5055
Spacer(modifier = Modifier.width(4.dp))
5156
}
52-
Text(
53-
text = walletName ?: stringResource(id = R.string.Privacy_Wallet),
54-
color = Color.White,
55-
fontSize = 14.sp
56-
)
5757
}
5858
Spacer(modifier = Modifier.height(7.dp))
5959
Box(

app/src/main/java/one/mixin/android/ui/wallet/transfer/TransferBalanceErrorBottomSheetDialogFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class TransferBalanceErrorBottomSheetDialogFragment : MixinBottomSheetDialogFrag
5959
val drawable = ContextCompat.getDrawable(requireContext(), R.drawable.ic_wallet_privacy_white)
6060
drawable?.setBounds(0, 0, 22.dp, 22.dp)
6161
binding.walletTv.compoundDrawablePadding = 4.dp
62-
binding.walletTv.setCompoundDrawablesRelative(drawable, null, null, null)
62+
binding.walletTv.setCompoundDrawablesRelative(null, null, drawable, null)
6363
dialog.setCanceledOnTouchOutside(false)
6464
(dialog as BottomSheet).apply {
6565
setCustomView(contentView)

app/src/main/java/one/mixin/android/ui/wallet/transfer/TransferBottomSheetDialogFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class TransferBottomSheetDialogFragment : MixinBottomSheetDialogFragment() {
216216
val drawable = ContextCompat.getDrawable(requireContext(), R.drawable.ic_wallet_privacy_white)
217217
drawable?.setBounds(0, 0, 22.dp, 22.dp)
218218
binding.walletTv.compoundDrawablePadding = 4.dp
219-
binding.walletTv.setCompoundDrawablesRelative(drawable, null, null, null)
219+
binding.walletTv.setCompoundDrawablesRelative(null, null, drawable, null)
220220

221221
binding.bottom.setOnClickListener({
222222
callback?.onDismiss(isSuccess)

app/src/main/java/one/mixin/android/ui/wallet/transfer/TransferInvoiceBottomSheetDialogFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class TransferInvoiceBottomSheetDialogFragment : MixinBottomSheetDialogFragment(
114114
val drawable = ContextCompat.getDrawable(requireContext(), R.drawable.ic_wallet_privacy_white)
115115
drawable?.setBounds(0, 0, 22.dp, 22.dp)
116116
binding.walletTv.compoundDrawablePadding = 4.dp
117-
binding.walletTv.setCompoundDrawablesRelative(drawable, null, null, null)
117+
binding.walletTv.setCompoundDrawablesRelative(null, null, drawable, null)
118118
dialog.setCanceledOnTouchOutside(false)
119119
(dialog as BottomSheet).apply {
120120
onBackPressedDispatcher.addCallback(this, onBackPressedCallback)

app/src/main/java/one/mixin/android/widget/TitleView.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class TitleView(context: Context, attrs: AttributeSet) : RelativeLayout(context,
110110
val drawable = ContextCompat.getDrawable(context, icon)
111111
drawable?.setBounds(0, 0, 12.dp, 12.dp)
112112
binding.subTitleTv.textView.compoundDrawablePadding = 4.dp
113-
binding.subTitleTv.textView.setCompoundDrawablesRelative(drawable, null, null, null)
113+
binding.subTitleTv.textView.setCompoundDrawablesRelative(null, null, drawable, null)
114114
}
115115
}
116116

@@ -164,14 +164,14 @@ class TitleView(context: Context, attrs: AttributeSet) : RelativeLayout(context,
164164
) {
165165
binding.titleTv.setTextOnly(title)
166166
if (index != 0) {
167-
binding.subTitleTv.isVisible = false
167+
binding.subTitleTv.isVisible = true
168168
if (index == 1) {
169169
setSubTitle(title, label ?: "", R.drawable.ic_wallet_privacy)
170170
} else {
171171
setSubTitle(title, label ?: "")
172172
}
173173
} else if (label != null) {
174-
binding.subTitleTv.isVisible = true
174+
binding.subTitleTv.isVisible = false
175175
binding.labelTitleTv.isVisible = true
176176
binding.labelTitleTv.text = label
177177
} else {

app/src/main/res/layout/fragment_transfer_balance_error_bottom_sheet.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
android:drawablePadding="4dp"
3232
android:text="@string/Privacy_Wallet"
3333
android:textColor="@android:color/white"
34-
android:drawableStart="@drawable/ic_wallet_privacy_white"
34+
android:drawableEnd="@drawable/ic_wallet_privacy_white"
3535
android:textSize="14sp"
3636
android:gravity="center_vertical"
3737
android:translationY="10dp"

0 commit comments

Comments
 (0)