I'm having a slight android layout issue...
I have a ScrollView element holding a LinearLayout. I want the scrollview to fill the entire device screen and the linearlayout to fill the whole height of the scrollview.
I have the code below which is resulting in the scrollView filling the whole screen but the linearLayout only filling about half of the height of the scrollview.
Here is my code:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff036c07">
<LinearLayout
android:background="#FF0000"
android:id="@+id/overview_form"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</LinearLayout>
</ScrollView>
Any ideas what I am missing?
Add android:fillViewport="true"
to the scrollview .
Add the
android:fillViewport="true"
property in your ScrollView
and
also remove unncessary namespace from linearlayout which is
xmlns:android="http://schemas.android.com/apk/res/android"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With