문제

I'm trying to implement a sliding menu just like the one found in Google's Google+ Android app:

GoogleApp

I've got the actual sliding menu working but I'm having trouble implementing a scrolling view that can hold any type of child views.

For example I would like to have a header like the "NOTIFICATIONS" row in screenshot and below it a ListView with notification items. And I would like to have another sections below that list, perhaps called "ERRORS" and below it a different ListView with errors. And perhaps a WebView at the very bottom.

How is this best implemented?

Note: I have read this tutorial but it's talking about a single ListView. I would like to construct this using a LinearLayout or alike, if that's possible.

도움이 되었습니까?

해결책

The way I ended up implementing this was with a ScrollView that I simply populated with Views.

There are some things to be considered when using a ScrollView, like this answer or the Android documentation.

From what I understand, if you need a whole lot of items in a list then you should look at using a ListView. Otherwise a ScrollView will do just fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top