How to add multiple listviews to Single activity in android?
I have been trying to get a specific layout for more than two days now and really struck with it, what am trying to achieve is:
To have a layout like the following
LISTVIEW A
VIEW
LISTVIEW B
VIEW
LISTVIEW C
(VIEWS are basically for headers)
开发者_StackOverflowCan any one help to sort out this task?
You don't need 3 ListViews but a single ListView with a more complex Adapter. Check this question: View like android's contact screen and follow the advice in the only answer.
Make a parent activity with three fragment placeholders. Then, create three fragments each holding one of the listviews and use a fragmentmanager to start them.
精彩评论