Wednesday, June 22, 2011

[android-developers] how to add images to an alertdialog list

Hello,
Is there an easy way to add pictures to an alertdialog list?


final CharSequence[] items = {"Foo", "Bar", "Baz"};

AlertDialog.Builder builder = new
AlertDialog.Builder(MyChats.this);
builder.setTitle("Make your selection");
builder.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
// Do something with the selection
}
});
AlertDialog alert = builder.create();
alert.show();

Thanks,
http://www.arcdroid.com


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate