Questions tagged [android-compose-dialog]

11 questions
58
votes
9 answers

Show custom alert dialog in Jetpack Compose

I am searching how create custom dialog in Jetpack Compose. In XML or Material Design we can create easily custom Dialog in which we can take user input, radio button etc. but i am not finding such thing in Jetpack Compose.
12
votes
3 answers

Not able to show AlertDialog from onClick in Jetpack Compose

I have been trying to show AlertDialog from onClick of Card in dynamic list in Android Jetpack Compose. I am getting compile time error @Composable invocations can only happen from the context of a @Composable function when doing it. Below is my…
10
votes
1 answer

ProgressDialog in jetpack compose

I want to show Indeterminate progress dialog when user performs some action like signing up. The old way it was possible using ProgressDialog. For compose, I found this How can I render plain android ProgressBar with Compose? But this is not exactly…
7
votes
2 answers

How to dismiss a composable dialog?

I am a new in jetpack compose and I really wanted to know how I can dismiss a composable dialog. Is there any function like dismiss() for dialog in jetpack compose? By using below code, I cannot dismiss the dialog either touching outside or pressing…
1
vote
0 answers

Correct way to use dialogs with jetpack compose

I can't find a right way to use dialogs in compose. For example I have a common bottom sheet dialog with options list. I created an OptionsDialog widget, OptionsDialogState (list of options like: title, icon and etc) and rememberSaveable function…
1
vote
1 answer

Android Compose Dialog only opens once

I have started use Compose in my project. And I faced with problem and don't know how to solve it. I have a list with photos. When I click at photo , I show dialog in full screen with this photo. On photo I have close icon. When I click close icon,…
Monica
  • 384
  • 2
  • 4
  • 16
1
vote
1 answer

Dialog in Jetpack Compose

I am new in Jetpack Compose. I just implemented an AlertDialog in Jetpack Compose. I'am not clear about Dialog show and dismiss process. Here is sample code: @Composable fun CreateAlertDialog() { Column { val openDialog = remember {…
1
vote
1 answer

JetpackCompose - "LocalFocusManager.current.moveFocus()" doesn't work in Dialog

I am trying to create a layout of a dialog with two TextFields. In doing so, I am trying to incorporate a feature that when the user completes the upper input field, it will be taken to the next input field by pressing the Next Key. However, it does…
0
votes
0 answers

Dialogs on Sasung devices (One UI) aligned to bottom of screen

I have two functions to show dialogs in my app, one is to show a dialog with a progress bar (using the Dialog component) and the second one is to show a dialog with buttons (using the AlertDialog component). I'm using compose 1.3.2 and…
0
votes
2 answers

How to add divider in title in Alert Dialog in jetpack compose

I want to add Divider after title. I tried to add Divider(), but it goes to above the text. I am using Material 3 using implementation "androidx.compose.material3:material3:1.0.1" import androidx.compose.foundation.lazy.LazyColumn import…
0
votes
3 answers

Why can't I use Modifier.padding(top = 20.dp) to increase space in AlertDialog when I use JetPack Compose?

The Code A displays a dialog box based AlertDialog, and I get Image A when I run Code A. I find the space between title = { Text(text = dialogTitle) } and text = {...} is too closer in Image A. So I set Modifier.padding(top = 100.dp) to wish to…