I do not know how to put button at top right most corner of the screen in jetpack compose.Please help me with the code?
I have added button but it is showing at the centre of the screen
I do not know how to put button at top right most corner of the screen in jetpack compose.Please help me with the code?
I have added button but it is showing at the centre of the screen
Can you try this?
@Composable
fun MyScreen() {
Box(
modifier = Modifier.fillMaxSize()
){
Button(
modifier = Modifier.align(Alignment.TopEnd),
onClick = {}
) {
Text("A Button")
}
}
}
© 2022 - 2024 — McMap. All rights reserved.