0

I have a relative layout which has ScrollView and it contain another RelativeLayout. Child Relative layout layout_height is set to match_parent but it react as its set to wrap_content

Here is xml code

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="com.digitnomics.isite.Signage" tools:showIn="@layout/activity_signage"> <ScrollView android:id="@+id/scrollView2" android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> 

Here the preview of the layout

ScrollView set to match_parent

enter image description here

Child RelativeLayout set to match_parent

enter image description here

How can I force Child Relative layout layout_height to fill entire height?

1 Answer 1

2

In your ScrollView set

android:fillViewport="true" 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.