Joseph, as I stated in my original post I already have created custom layout with and ImageView and two TextViews.
The question at hand is: How do I populate a ListView, that has a custom list item as defined above, from XML resource? I.e.: Having a custom layout with ImageView and two TextViews, how can I define the content in XML resource? On Aug 8, 2:53 pm, Joseph Earl <joseph.w.e...@gmail.com> wrote: > Create a custom layout with an ImageView and two TextViews. > > On Aug 8, 7:07 pm, gnugu <rho...@gmail.com> wrote: > > > > > Hello, > > I have created a custom list item layout just like in this > > articlehttp://developer.android.com/resources/articles/layout-tricks-efficie.... > > > Each list item has icon, title and summary. > > > I would like to declare an xml resource that would provide data for > > that list. Just like you use <string-array> to populate the list using > > ArrayAdapter<String>. > > > The simple ArrayAdapter<String> can be populated from: > > > <resources xmlns:android="http://schemas.android.com/apk/res/android"> > > <string-array name="main_screen_actions"> > > <item>Guest</item> > > <item>Login</item> > > <item>Register</item> > > </string-array> > > </resources> > > > I need each <item> to have icon, title and summary. Somewhat similar > > to: > > <menu xmlns:android="http://schemas.android.com/apk/res/android"> > > <item android:id="@+id/item1" > > android:title="@string/item1" > > android:icon="@drawable/group_item1_icon" /> > > </menu> > > > I would use <menu> but menu doesn't have summary if I'm not mistaken. > > > What would be the best way to do something like this? > > > Thank you. -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en