Skip to content

Commit 70a311d

Browse files
committed
Fix WalletAddressDialog UI overflow
1 parent 5530139 commit 70a311d

File tree

4 files changed

+28
-21
lines changed

4 files changed

+28
-21
lines changed

amuze/src/main/java/com/infbyte/amuze/ui/dialogs/WalletAdressDialog.kt

+14-16
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,27 @@ fun WalletAddressDialog(
5454
Text(
5555
address,
5656
Modifier
57-
.fillMaxWidth(.735f)
57+
.fillMaxWidth(.73f)
5858
.padding(end = 8.dp)
5959
.horizontalScroll(addressScrollState),
6060
maxLines = 1
6161
)
62-
Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
63-
TextButton(
64-
onClick = {
65-
val clipboardManager =
66-
context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
67-
clipboardManager.setPrimaryClip(
68-
ClipData.newPlainText(
69-
context.getString(R.string.amuze_wallet_address),
70-
address
71-
)
62+
TextButton(
63+
onClick = {
64+
val clipboardManager =
65+
context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
66+
clipboardManager.setPrimaryClip(
67+
ClipData.newPlainText(
68+
context.getString(R.string.amuze_wallet_address),
69+
address
7270
)
73-
}
74-
) {
75-
Icon(painterResource(R.drawable.ic_content_copy), contentDescription = "")
76-
Text(stringResource(R.string.amuze_copy))
71+
)
7772
}
73+
) {
74+
Icon(painterResource(R.drawable.ic_content_copy), contentDescription = "")
75+
Text(stringResource(R.string.amuze_copy))
7876
}
7977
}
8078
}
8179
}
82-
}
80+
}

app/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ android {
3838
jvmTarget = "1.8"
3939
}
4040
buildFeatures {
41+
buildConfig = true
4142
compose = true
4243
}
4344
composeOptions {

app/src/main/java/com/infbyte/amuze_android/MainActivity.kt

+12-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import androidx.activity.enableEdgeToEdge
77
import androidx.compose.foundation.layout.fillMaxSize
88
import androidx.compose.foundation.layout.padding
99
import androidx.compose.material3.Scaffold
10+
import androidx.compose.material3.Slider
1011
import androidx.compose.material3.Text
1112
import androidx.compose.runtime.Composable
1213
import androidx.compose.ui.Modifier
@@ -28,10 +29,7 @@ class MainActivity : ComponentActivity() {
2829
setContent {
2930
AmuzeAndroidTheme {
3031
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
31-
Greeting(
32-
name = "Android",
33-
modifier = Modifier.padding(innerPadding)
34-
)
32+
AboutScreen("Amuze-Demo", BuildConfig.VERSION_NAME, R.drawable.ic_amuzic_foreground, R.string.amuze_privacy_policy) { }
3533
}
3634
}
3735
}
@@ -46,6 +44,16 @@ fun Greeting(name: String, modifier: Modifier = Modifier) {
4644
)
4745
}
4846

47+
@Preview(showBackground = true)
48+
@Composable
49+
fun PreviewSlider() {
50+
AmuzeAndroidTheme {
51+
Slider(
52+
value = 0.5f,
53+
onValueChange = {}
54+
)
55+
}
56+
}
4957
@Preview(showBackground = true)
5058
@Composable
5159
fun PreviewWalletAddressDialog() {

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ junitVersion = "1.2.1"
77
espressoCore = "3.6.1"
88
lifecycleRuntimeKtx = "2.8.5"
99
activityCompose = "1.9.2"
10-
compose = "1.7.1"
10+
compose = "1.7.2"
1111
material3 = "1.3.0"
1212
appcompat = "1.7.0"
1313
vMavenPublish = "0.29.0"

0 commit comments

Comments
 (0)