Questions tagged [dialog]

A temporary window presented to a user (usually as a small box). It interrupts program flow, overlaying the UI, for the purpose of alerting the user or requiring user input or confirmation about a program decision. Sometimes dialogs are used to present forms for user input.

Dialogs, a type of , is a customisable temporary window (usually in the form of a small box) that overlays the UI and, usually, freezes the UI until the user interacts with the dialog, usually by pressing a button or exiting the dialog.

Sometimes dialogs are used to present forms for user input.

Some examples of dialogs: jQuery, android

See also:

12143 questions
1282
votes
48 answers

Activity has leaked window that was originally added

What is this error, and why does it happen? 05-17 18:24:57.069: ERROR/WindowManager(18850): Activity com.mypkg.myP has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44c46ff0 that was originally added here 05-17 18:24:57.069:…
Pentium10
  • 204,586
  • 122
  • 423
  • 502
855
votes
17 answers

How to create a dialog with “Ok” and “Cancel” options

I am going to make a button to take an action and save the data into a database. Once the user clicks on the button, I want a JavaScript alert to offer “yes” and “cancel” options. If the user selects “yes”, the data will be inserted into the…
crchin
  • 9,473
  • 6
  • 22
  • 28
812
votes
21 answers

How to prevent a dialog from closing when a button is clicked

I have a dialog with EditText for input. When I click the "yes" button on dialog, it will validate the input and then close the dialog. However, if the input is wrong, I want to remain in the same dialog. Every time no matter what the input is, the…
441
votes
12 answers

How do I use OpenFileDialog to select a folder?

I was going to use the following project: https://github.com/scottwis/OpenFileOrFolderDialog However, there's a problem: it uses the GetOpenFileName function and OPENFILENAME structure. OPENFILENAME has the member named templateID, which is the…
Yun
  • 5,233
  • 4
  • 21
  • 38
357
votes
33 answers

How to make an alert dialog fill 90% of screen size?

I can create and display a custom alert dialog just fine but even so I have android:layout_width/height="fill_parent" in the dialog xml it is only as big as the contents. What I want is dialog that fills the entire screen except maybe a padding of…
Fabian
  • 5,476
  • 4
  • 35
  • 46
340
votes
9 answers

Create and save a file with JavaScript

I have data that I want to write to a file, and open a file dialog for the user to choose where to save the file. It would be great if it worked in all browsers, but it has to work in Chrome. I want to do this all client-side. Basically I want to…
user1756980
  • 3,807
  • 4
  • 16
  • 13
322
votes
17 answers

Open directory dialog

I want the user to select a directory where a file that I will then generate will be saved. I know that in WPF I should use the OpenFileDialog from Win32, but unfortunately the dialog requires file(s) to be selected - it stays open if I simply click…
Alexandra
  • 4,723
  • 3
  • 26
  • 32
279
votes
20 answers

Prevent Android activity dialog from closing on outside touch

I have an activity that is using the Theme.Dialog style such that it is a floating window over another activity. However, when I click outside the dialog window (on the background activity), the dialog closes. How can I stop this behaviour?
Fergusmac
  • 3,679
  • 4
  • 20
  • 24
276
votes
26 answers

Android: How to create a Dialog without a title?

I'm trying to generate a custom dialog in Android. I create my Dialog like this: dialog = new Dialog(this); dialog.setContentView(R.layout.my_dialog); Everythings works fine except for the title of the Dialog. Even if I don't set the title of the…
Janusz
  • 187,060
  • 113
  • 301
  • 369
271
votes
15 answers

How to change theme for AlertDialog

I was wondering if someone could help me out. I am trying to create a custom AlertDialog. In order to do this, I added the following line of code in styles.xml