Sunday, 5 October 2014

Android: ListView inside an AlertDialog

In this tutorial we show how to create a list inside an alert dialog.

The items of the list are defined in the class Component.java and are made of a title and a subtitle.
When the application is started, it's created an Arraylist with 3 elements of this type.

The main activity is implemented in MainActivity.java:

The layout of the alert dialog is defined in list_dialog.xml:

The layout of the single item of the list is defined in component.xml:

The adapter for the correspondence between the layout and the list is defined in ComponentAdapter.java:


You can download the complete example from our repository: Download ListDialog.zip

The final result is the following:

77 comments:

  1. It's interesting that many of the bloggers your tips helped to clarify a few things for me as well as giving... very specific nice content.Android Training in chennai | Android Training

    ReplyDelete
    Replies
    1. Great Article android based projects

      Java Training in Chennai Project Center in Chennai Java Training in Chennai projects for cse The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training Project Centers in Chennai

      Delete
  2. Some us know all relating to the compelling medium you present powerful steps on this blog and therefore strongly encourage contribution from other ones on this subject while our own child is truly discovering a great deal. Have fun with the remaining portion of the year.
    Data Science training in marathahalli
    Data Science training in btm
    Data Science training in rajaji nagar
    Data Science training in chennai
    Data Science training in kalyan nagar
    Data Science training in electronic city
    Data Science training in USA
    Data science training in pune


    ReplyDelete
  3. Well somehow I got to read lots of articles on your blog. It’s amazing how interesting it is for me to visit you very often.
    java training in chennai | java training in bangalore

    java online training | java training in pune

    java training in chennai | java training in bangalore

    ReplyDelete
  4. It seems you are so busy in last month. The detail you shared about your work and it is really impressive that's why i am waiting for your post because i get the new ideas over here and you really write so well.
    python training in tambaram
    python training in annanagar
    python training in OMR
    python training in chennai

    ReplyDelete
  5. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 
    Devops training in velachery
    Devops training in annanagar
    Devops training in sholinganallur
    Devops training in tambaram

    ReplyDelete
  6. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Blueprism training in marathahalli

    Blueprism training in btm

    Blueprism online training

    ReplyDelete
  7. Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.
    Blueprism training in marathahalli

    Blueprism training in btm

    Blueprism online training

    ReplyDelete
  8. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    angularjs Training in bangalore

    angularjs Training in btm

    angularjs Training in electronic-city

    angularjs online Training

    angularjs Training in marathahalli

    ReplyDelete
  9. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

    angularjs

    Training in chennai


    angularjs-Training in chennai

    angularjs Training in chennai

    angularjs-Training in tambaram

    angularjs-Training in sholinganallur

    angularjs-Training in velachery

    ReplyDelete
  10. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.

    AWS Interview Questions And Answers

    AWS Training in Bangalore | Amazon Web Services Training in Bangalore

    AWS Training in Pune | Best Amazon Web Services Training in Pune

    Amazon Web Services Training in Pune | Best AWS Training in Pune

    AWS Online Training | Online AWS Certification Course - Gangboard

    ReplyDelete
  11. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.

    AWS Interview Questions And Answers

    AWS Training in Bangalore | Amazon Web Services Training in Bangalore

    AWS Training in Pune | Best Amazon Web Services Training in Pune

    Amazon Web Services Training in Pune | Best AWS Training in Pune

    AWS Online Training | Online AWS Certification Course - Gangboard

    ReplyDelete
  12. This is a terrific article, and that I would really like additional info if you have got any. I’m fascinated with this subject and your post has been one among the simplest I actually have read.
    online Python certification course | python training in OMR | Python training course in Chennai

    ReplyDelete
  13. You are doing a great job. I would like to appreciate your work for good accuracy
    Regards,
    Selenium Training Institute in Chennai | Selenium Testing Training in chennai

    ReplyDelete
  14. Have you been thinking about the power sources and the tiles whom use blocks I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post
    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    ReplyDelete
  15. Thank you for allowing me to read it, welcome to the next in a recent article. And thanks for sharing the nice article, keep posting or updating news article.
    redmi service center in vadapalani
    redmi service center in t nagar
    redmi service center in velachery

    ReplyDelete
  16. Alleyaaircool is the one of the best home appliances repair canter in all over Delhi we deals in repairing window ac, Split ac , fridge , microwave, washing machine, water cooler, RO and more other home appliances in cheap rates

    Window AC Repair in vaishali
    Split AC Repair in indirapuram
    Fridge Repair in kaushambi
    Microwave Repair in patparganj
    Washing Machine Repair in vasundhara
    Water Cooler Repair in indirapuram
    RO Service AMC in vasundhara
    Any Cooling System in vaishali
    Window AC Repair in indirapuram

    ReplyDelete
  17. Інформація, яку ви поділяєте, занадто гарна і цікава. Мені пощастило прочитати цю статтю

    Phối chó bull pháp

    Phối giống chó Corgi

    Phối chó Pug

    Dịch vụ phối giống chó Poodle

    Dịch vụ phối giống chó bull pháp

    ReplyDelete
  18. ఈ ఆర్టికల్ చూడడానికి నాకు చాలా అదృష్టంగా ఉంది. మీరు ఎల్లప్పుడూ ఆనందంగా మరియు సంతోషంగా ఉంటారు

    giảo cổ lam giảm cân

    giảo cổ lam giảm béo

    giảo cổ lam giá bao nhiêu

    giảo cổ lam ở đâu tốt nhất

    ReplyDelete
  19. Дээд чанар бол зүгээр л( đá ruby thiên nhiên ) санаатай биш юм. Энэ нь өндөр( đá ruby nam phi ) түвшний төвлөрөл, тусгай хүчин( Đá Sapphire ) чармайлт, ухаалаг ( đá sapphire hợp mệnh gì )чиг баримжаа, чадварлаг туршлага, ( đá ruby đỏ )саад тотгорыг даван туулах( bán đá sapphire thô ) боломжийг хардаг.

    ReplyDelete
  20. Vanskeligheter( van bi ) vil passere. På samme måte som( van điện từ ) regnet utenfor( van giảm áp ) vinduet, hvor nostalgisk( van xả khí ) er det som til slutt( van cửa ) vil fjerne( van công nghiệp ) himmelen.

    ReplyDelete
  21. Vanskeligheter( van bướm ) vil passere. På samme måte som( van điện từ ) regnet utenfor( van giảm áp ) vinduet, hvor nostalgisk( van an toàn ) er det som til slutt( van bướm tay quay ) vil fjerne himmelen.

    ReplyDelete
  22. Tökezlediğiniz ve ayağa kalkıp(  taxi Nội Bài ) devam edemediğiniz( taxi noi bai ) gibi görünen zamanlar vardır, lütfen bazen( taxi sân bay nội bài rẻ nhất )  zorlukların üstesinden gelmenize yardımcı olacak, yaşamınızla(số điện thoại taxi nội bài ) ilgili iyi ( dịch vụ taxi đi nội bài chất lượng ) et. Aşağıdaki makale, yaşam hakkında 100'den fazla güzel kelime size tanıtır.

    ReplyDelete
  23. Your info is really amazing with impressive content..Excellent blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog..
    If you are looking for any python Related information please visit our website python training institutes in Bangalore page!

    ReplyDelete
  24. And indeed, Iam just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I have had.
    Dotnet Training in Chennai
    Matlab Training in Chennai
    Embedded Training in Chennai
    Clinical SAS Training in Chennai
    Powerbi Training in Chennai
    R Programming Training in Chennai

    ReplyDelete
  25. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful . digital marketing training in bangalore

    ReplyDelete
  26. Your articles really impressed for me,because of all information so nice.servicenow training in bangalore

    ReplyDelete
  27. These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post.opennebula training in bangalore

    ReplyDelete
  28. I gathered a lot of information through this article.Every example is easy to undestandable and explaining the logic easily.openstack training in bangalore

    ReplyDelete
  29. Very useful and information content has been shared out here, Thanks for sharing it.salesforce developer training in bangalore

    ReplyDelete
  30. This is really an awesome post, thanks for it. Keep adding more information to this.vmware training in bangalore

    ReplyDelete
  31. Thanks for one marvelous posting! I enjoyed reading it; you are a great author. I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great posts.Manual Testing Training in Bangalore

    ReplyDelete
  32. Thanks for sharing this blog. This very important and informative blog.MSBI Training in Bangalore

    ReplyDelete
  33. Learned a lot of new things from your post! Good creation and HATS OFF to the creativity of your mind.HADOOP BIGDATA training in bangalore

    ReplyDelete
  34. Effective blog with a lot of information. I just Shared you the link below for Courses .They really provide good level of training and Placement,I just Had Python Classes in this institute , Just Check This Link You can get it more information about the Python course.


    Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

    ReplyDelete
  35. Such an excellent and interesting information in your blog, it is awesome to read and do post like this with more informations.  Salesforce Training Australia    

    ReplyDelete
  36. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. Buy Tramadol Online

    ReplyDelete
  37. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries
    DevOps Training in Chennai

    DevOps Course in Chennai


    ReplyDelete
  38. Useful article which was very helpful. also interesting and contains good information.
    to know about python training course , use the below link.

    Python Training in chennai

    Python Course in chennai

    ReplyDelete
  39. Wonderful post and such a fantastic information that you gave to us. Thank you so much for it. Keep updating.

    Java Training in Chennai

    Java Course in Chennai

    ReplyDelete
  40. Acquire the trending Selenium training in Chennai from the best software training institute in Chennai, Infycle Technologies. Additionally, we come up with the latest demanded technological courses like Python, Data Science, Digital Marketing, Big Data, Oracle, AWS, Azure, Google Cloud, Java, and Oracle with the best faculties in the industry. To clear your doubts, call +91-7504633633 or +91-7502633633.

    ReplyDelete