Friday, March 7, 2014

ListView inside ScrollView


posts by wiso33 on 2013-10-16 19:13:32 Edit

android: layout_width = "match_parent"
android: layout_height = "match_parent"
android: orientation = "vertical">
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: text = "content" />
android: layout_width = "fill_parent"
android: layout_height = "wrap_content">
android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: orientation = "vertical">
android: layout_width = "wrap_content"
android: layout_height = "wrap_content" />
android: layout_width = "fill_parent"
android: layout_height = "wrap_content" />
android: layout_width = "wrap_content"
android: layout_height = "wrap_content" />
android: layout_width = "fill_parent"
android: layout_height = "wrap_content" />
android: layout_width = "wrap_content"
android: layout_height = "wrap_content" />



Design goals: In addition to the top of the title TextView does not move, the entire screen to scroll the bottom ImageView can roll on the screen. However, the results of the ListView height shrunk two lines, not all displays. How can we solve?<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
ScrollView inside the ListView is almost impossible to put online solutions most of them have some performance or other issues.
See your layout, looks like there are two ListView, in the middle there is an ImageView.
I suggest you implement a more complex Adapter to fulfill your needs, the two ListView into a ListView, ScrollView then removed, the height of the ListView is set to fill_parent.

Reply:
This method is mainly:
http://stackoverflow.com/questions/3495890/how-can-i-put-a-listview-into-a-scrollview-without-it-collapsing

No comments:

Post a Comment