Pratik Bhat
Pratik Bhat

Reputation: 7614

android- using nested alert dialogs

i m developing an app in which i m using facebook login
when the user clicks on a button .. i show an alert dialog whether the user wants to add the page to favorites...
and if yes... then another alert dialog whether he wants to proceed using facebook login... my question is
can i use nested dialogs,? or is there any other neater and cleaner solution to this? suggestions welcome

thanks

Upvotes: 1

Views: 1663

Answers (3)

Khawar Raza
Khawar Raza

Reputation: 16120

You can use nested dialogs. You can call a dialog from another dialog. Add listeners to your first dialog buttons and in those listeners, dismiss the first dialog and starts the other one. What's the problem in doing that?

Upvotes: 2

Maurycy
Maurycy

Reputation: 3981

When you say Facebook Login do you mean the facebook android sdk? Also using less hacks is always good especially for UX. I wouldn't use nested dialogs also if you are using the facebook sdk then it actually loads up a separate activity. I would focus on making the app feel natural and not try any fancy hacks. This is something a lot of android developers forget to do which can be super frustrating to see.

Anyways i suggest you change the method by which people add the page to favorites. maybe use the menu button with menu, or maybe have a button or checkbox on the page not requiring any dialog.

Upvotes: 0

Caner
Caner

Reputation: 59308

You can launch the second dialog from the onClick handler of the 1st AlertDialog.

Upvotes: 0

Related Questions