Add an android: fillViewport = "true" (to) in ScrollView ),
Http://www.2cto.com/kf/201208/148262.html
Solution for setting android: layout_height = "fill_parent" in ScrollView
Add an android: fillViewport = "true" attribute to ScrollView. As the name suggests, this attribute allows components in ScrollView to fill it.
For example, the components added to the ScrollView cannot be automatically scaled to the screen height in any way.
Layout file.
[Html] <? Xml version = "1.0" encoding = "UTF-8"?> <! -- Background: blue --> <ScrollView xmlns: android = "http://schemas.android.com/apk/res/android" android: id = "@ + id/scrollView1" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: background = "# 0000ff"> <! -- Background: Green --> <LinearLayout android: id = "@ + id/linearLayout1" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: background = "#00ff00"> <TextView android: id = "@ + id/textView1" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_weight = "1" android: text = "Hello Android. "> </TextView> </LinearLayout> </ScrollView>
.
Although android: layout_height = "fill_parent" has been set, the entire LinearLayout and TextView cannot be filled with the entire screen.
Solution.
Add an android: fillViewport = "true" attribute to ScrollView. As the name suggests, this attribute allows components in ScrollView to fill it.
Modified.