Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Popup's in Android

 
Sreenu Vengala
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

how to show popup's with multiple values in Android, anyone help.

Thanks
srinu
 
VineetK Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sreenu,

You may use Toast class, to display dialogs or pop-ups in android. See if that helps.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sreenu Vengala wrote:Hi.

how to show popup's with multiple values in Android, anyone help.

Thanks
srinu


[Note sure what you mean by multiple values..]

You can extend the Dialog class and define your own custom view as its content View. You can then instantiate this class and do a Dialog.show() and Dialog.dismiss(). If you want to present an AlertDialog(one with a yes/No/cancel button) then is an AlertDialogBuilder class that can help...

Alternatively, you can create an Activity with Dialog theme and with desired content View and display this activity to the user.
 
Sreenu Vengala
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the solution

new AlertDialog.Builder(MySettings.this)
.setTitle("Options")
.setItems(R.array.select_dialog_items3, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
switch(which){
case 0:
// for activation
break;
case 1:
//for personalisation
break;
case 2:
//cancel
break;
}
}
})
.create()
.show();
}
};
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic