开发者

android: how to specify multipe listivews

开发者 https://www.devze.com 2022-12-27 01:45 出处:网络
It seems that android has enforced that a listview 开发者_JS百科must have the name android:id=\"@android:id/list\", is there anyway to create multiple listview then? I have two activities which are bo

It seems that android has enforced that a listview 开发者_JS百科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.


Extend Activity (instead of ListActivity) and inflate a layout with any number of ListViews you like.


The id does not have to be android:id="@android:id/list". You can specify any id by android:id="@+id/thingsandalsootherthings"

0

精彩评论

暂无评论...
验证码 换一张
取 消