I have scroll in liner layout, here is my layout file
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content"> </ScrollView> </LinearLayout>
I want the height of the ScrolView to depend on its contents - wrap it, however, if this height makes the height of the whole layout more than that screen size, it needs to be fixed to fit the height of the screen. How can this be achieved?
source share