• 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

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();
}
};
 
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic