开发者

android: how to specify multipe listivews

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜