Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between PopUpWindow and Dialog?

Basically the question is stated in the title. Any preferences in using one or another? Maybe some specific tasks where one is superior/ more efficient/ better than the other?

like image 523
Denys Avatar asked Sep 10 '12 12:09

Denys


People also ask

What is the difference between a modal and a dialog?

Modal windows, by their nature, are compulsory and require the user to act immediately. Since the dialogs place the system in a different mode, users cannot continue what they are doing until they acknowledge the dialog.

What is the difference between dialog and AlertDialog?

AlertDialog is a lightweight version of a Dialog. This is supposed to deal with INFORMATIVE matters only, That's the reason why complex interactions with the user are limited. Dialog on the other hand is able to do even more complex things .

What is the difference between a dialog box and message box?

A message box is a modal dialog box and the system creates it by using the same internal functions that DialogBox uses. If the application specifies an owner window when calling MessageBox or MessageBoxEx, the system disables the owner.

What is the difference between dialogue box and menu?

Menus allow us to efficiently group/hide similar options together so that the screen does not become cluttered. Dialog Boxes allow us to momentarily take the user's attention away from the main window so as to obtain information or ask questions which are required at specific points in the application.


1 Answers

Dialog

"A dialog 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."

AlertDialog has many variants and as far as I can assume your problem, You can have a cross button too in the top-right corner of the dialog (You can set the icons anywhere, as you can provide a custom layout to an AlertDialog).

-Capable of adding any view

-Easy to edit

-Can be adapted to tablets or cellphones in landscape or portrait just by modifying the layout

-Can dedicate a whole new class just to modify it your way

PopupWindows

"This class represents a popup window that can be used to display an arbitrary view. The popup window is a floating container that appears on top of the current activity."

PopupWindow is another tool to customize your custom pop up anywhere in the screen. If you're showing this popup always in the middle of the screen, then I would like to suggest not to use this. The AlertDialog should work fine.

-Simpler

-Easier to code

-It's more standard so it'll be harder for the user to be confused with it

like image 121
Rohan Pawar Avatar answered Sep 24 '22 02:09

Rohan Pawar