-1

How to make a custom AlertDialog in listView format and each listItem must contain a image and textview.

There is a intent passing on clicking of individual listItem.

How to do this.?

user2085965
  • 393
  • 2
  • 13
  • 33

1 Answers1

2
final Dialog innerDialog = new Dialog(context);
innerDialog.setTitle("Title");
innerDialog.setContentView(R.layout.alert);

Add custom list to alert Layout and you can find views by innerDialog.findViewById()

Aditya Gupta
  • 508
  • 3
  • 18
  • I got the dialog. How to show this dialog in dropdown format.? – user2085965 Nov 19 '13 at 09:14
  • I dont understand your question – Aditya Gupta Nov 21 '13 at 07:02
  • I got a part of solution. Dialog menuAleart = new Dialog(this); menuAleart.setContentView(R.layout.alert); alert layout contain both an Image and textview. But, now my problem is- using xml we can show dialog as drop down format. how to do this using java code.? – user2085965 Nov 21 '13 at 11:05