Embedding a ListView in an Activity in Android
I have a listview a开发者_如何学运维t the top of my activity, does the entire activity need to extend ListActivity? Or can the main activity simply extend just Activity and a private sub-class can extend ListActivity to create the listview? I can't comprehend the best way to do this so a shove in the right direction would be awesome!
You can have View
s in a ListActivity
that are not ListView
s. If you only want one ListView
then ListActivity
will save you a lot of typing. But you don't have to use it. You can use a normal Activity
and do all the ListView
setup yourself. Are you worried about something specific?
The part about having more than one Activity
for the same UI doesn't really make any sense.
精彩评论