Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
composeBom = "2024.04.01"
Jetpack Compose component(s) used:
Alert Dialog
Android Studio Build:
Android Studio Ladybug | 2024.2.1 Patch 2
Kotlin version:
2.0.0
Steps to Reproduce or Code Sample to Reproduce:
Set the font size and display size to the biggest on settings.
When usePlatformDefaultWidth is set to false and width is handled by the modifier, height of the dialog overflows from the bottom, leaving buttons half visible and potentially unclickable.
Please note that the body of the dialog is a long and scrollable text.
Example code:
AlertDialog(
modifier = Modifier
.fillMaxWidth(0.90f),
title = { Text("Leave the app?", modifier = Modifier.semantics { heading() }) },
text = {
Column(modifier = Modifier.verticalScroll(rememberScrollState())) {
Text("$message $message")
}
},
onDismissRequest = { dismissAction.invoke() },
confirmButton = {
TextButton(
onClick = {
confirmAction?.invoke()
dismissAction.invoke()
}
) {
Text(text = positiveButtonText)
}
},
dismissButton = {
TextButton(
onClick = dismissAction
) {
Text(text = negativeButtonText)
}
},
properties = DialogProperties(usePlatformDefaultWidth = false)
)