Questions tagged [android-dialog]

Base class for Dialogs. A dialog in Android is a small window that prompts the user to make a decision or enter additional information. A dialog does not fill the screen and is normally used for modal events that require users to take an action before they can proceed.

A dialog is usually a small window that appears in front of the current Activity. The underlying Activity loses focus and the dialog accepts all user interaction. Dialogs are normally used for notifications that should interrupt the user and to perform short tasks that directly relate to the application in progress (such as a progress bar or a login prompt).

Official Android Dialog Documentation

1460 questions
8
votes
3 answers

Android: Can i show multiple Dialogs one over another? Is there something like Dialog Z-Level?

Is it possible to show multiple Dialogs one over another? Is there something like Dialog Z-Level? I am using DialogFragment where user chooses elements, when he comfirms his choice, it is saved to database and sent on server. if the save action…
Tomasz Gawel
  • 8,379
  • 4
  • 36
  • 61
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…
7
votes
3 answers

Show dialog activity over another app from background

Say you have an app A which opens up another app B (e.g. a map), which is not controlled by you (i.e. it's a preexisting app). So now app A is in the background. Suppose an event occurs and A wants to show a floating dialog over app B's UI (while…
Chris Middleton
  • 5,654
  • 5
  • 31
  • 68
7
votes
3 answers

Animation not working the in custom dialog

I have made the custom dialog following this link and its working perfectly all fine. but then I think to add the animation , so that it looks like coming from the to of the screen to the bottom side. So I searched for these two animations and found…
Coas Mckey
  • 701
  • 1
  • 13
  • 39
7
votes
0 answers

Android Highlight card as dialog modal inside recyclerview on click

I'm trying to implement a custom behavior in a card click inside of a RecyclerView, what I want to accomplish is to animate the selected Item layout by expanding and adding a fab on top of it, while dimming the screen behind. My current approach is…
7
votes
3 answers

Full width button material dialogs

I am trying to find an example code to implement a material dialog with full width buttons as shown in the screenshot below. Can someone help by sharing example code on how to replicate this design?
7
votes
2 answers

Custom Dialog Fragment

I am trying to create a simplistic dialog similar to a DatePickerDialog. The Dialog that I am creating should provide the user with an array of images from which they can select. I believe I have managed to create the array and add the correct…
7
votes
5 answers

Activity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@46029dd0

I am developing an feedback kind of application, when I click the "submitnow" button I am getting the following error Activity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@46029dd0 Following is my code, please…
7
votes
4 answers

AlertDialog.Builder cannot be resolved to a type error

I receive the error on the line below: AlertDialog.Builder alrtDialog = new AlertDialog.Builder(this); The Error show is : AlertDialog.Builder cannot be resolved to a type I import the following for this: import…
M D
  • 47,665
  • 9
  • 93
  • 114
7
votes
4 answers

Android Activity with Transparent Layout

I wish to create a activity that look like a popup window That is with transparent background for activity als i wish to show it in custom position on scree that is on right corner of device screen what i did was inside onCreate of pop over like…
edwin
  • 7,985
  • 10
  • 51
  • 82
7
votes
2 answers

Android creating AlertDialog using values from ArrayList?

I am using following code to create a Dialog aleart box with lists item from studentNames ArrayList.I am creating this ArrayList by reading childfile array.But when this code runs it just display a Dialog box with zero list item.I have even check my…
Anshul
  • 7,914
  • 12
  • 42
  • 65
7
votes
2 answers

How to cancel or dismiss a custom dialog in its onCreate method?

I have created a custom dialog called MyCustomDialog which extends Dialog. I create and show my custom dialog as follows: new MyCustomDialog(myContext).show(); I override the Dialog.onCreate(Bundle savedInstanceState) method to do my…
Adil Hussain
  • 30,049
  • 21
  • 112
  • 147
7
votes
3 answers

How can I display a dialog on Currently visible activity on android?

My Problem is similar to this 2 year old question, I am just re posting the same problem to get the updated answers, since a lot has changed in two years. I am developing for an app for GingerBread+ devices, I have many activities and in…
Amit
  • 13,134
  • 17
  • 77
  • 148
6
votes
2 answers

Divider is not shown when the RecyclerView is on a Dialog

I used the exact same code below for both a RecyclerView in a Fragment and another RecyclerView in a Dialog. myAdapter = MyAdapter(); var lm = LinearLayoutManager(this.context) myRecyclerView.layoutManager = lm; …
Damn Vegetables
  • 11,484
  • 13
  • 80
  • 135
6
votes
3 answers

Get editText value from alertDialog builder

I'm new to android. I need to get editText's value to search something. But when I run the program, error comes as null pointer exception. "EditText etSearch" isn't getting the text of it. Please help me. Thanks. public boolean…
Shehan Sap
  • 85
  • 1
  • 5