It seems that android has enforced that a listview must have the name android:id="@android:id/list", is there anyway to create multiple listview then? I have two activities which are both listview but have to control different format of Lists, one with image+text the other is just text.
+1
A:
The id does not have to be android:id="@android:id/list"
. You can specify any id by android:id="@+id/thingsandalsootherthings"
jqpubliq
2010-04-18 04:02:16
Is that true? Check out what synic said in this post: http://stackoverflow.com/questions/2661073/android-how-to-specify-multipe-listivews
Yang
2010-04-18 08:09:09
The link you have there is to this question. You only use `android:id="@android:id/list"` for one `ListView` in a `ListActivity`. If you want your `ListActivity` to have two `ListViews`, then name the second one something else, then use it like a regular widget (e.g., `findViewById()` to get the `ListView`).
CommonsWare
2010-04-18 11:44:50
+1
A:
Extend Activity
(instead of ListActivity
) and inflate a layout with any number of ListViews
you like.
alex
2010-04-18 09:49:55