• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Popup's in Android

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

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

Thanks
srinu
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sreenu,

You may use Toast class, to display dialogs or pop-ups in android. See if that helps.
 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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();
}
};
 
reply
    Bookmark Topic Watch Topic
  • New Topic