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:

35 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
  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. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. Інформація, яку ви поділяєте, занадто гарна і цікава. Мені пощастило прочитати цю статтю

    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
  11. 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
  12. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful . digital marketing training in bangalore

    ReplyDelete
  13. 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
  14. 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