开发者

How to add multiple listviews to Single activity in android?

开发者 https://www.devze.com 2023-01-22 18:53 出处:网络
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:

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)

开发者_StackOverflow

Can 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.

0

精彩评论

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