I already have a ListView
where each row contains two TextView
s and a ImageView
. But what I want to do now is to add number of ImageView
s into my row. How can i do it? is it by using Nested listviews how to do it? and can i use the same id android:id="@android:id/list"
Asked
Active
Viewed 149 times
0

dinesh707
- 12,106
- 22
- 84
- 134
-
Use expandable listview for your purpose... – Bharat Sharma May 14 '12 at 12:04
-
simply i need to make something like this https://lh6.ggpht.com/6IdzucfF85DywfqkShiIonyWcEXyg9188pEi6qsYA0Y0sK4CE2LgkYk2TwiZzO8UXDM here the walking man, bus, metro images can be different and number of occurrences also differ. – dinesh707 May 14 '12 at 12:07
1 Answers
0
- You should either go for
ExpandableListView
, and add theTextViews
to yourparentView
renderers, or - You can create your
own renderer for the list, where each item is a
View
containing the twoTextViews
and aListView
.
Your inner ListViews
can have any id attribute, since it does not need to be unique, and from the Adapter
implementation you will always know exactly where you are (in the tree).
A sample implementation of a nested view can be found here.