Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FrameLayout does not match the height of NestedScrollView

I have a FrameLayout inside a NestedScrollView, as

<android.support.v4.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#000000">

But the FrameLayout is not filling the height of the NestedScrollView. How might I fix this?

like image 820
learner Avatar asked Nov 27 '15 17:11

learner


1 Answers

Check This Solution
Use fillViewport="true" this attribute causes the scroll view’s child to expand to the height of the ScrollView if needed. When the child is taller than the ScrollView, the attribute has no effect.

 <android.support.v4.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
      android:fillViewport="true"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">
like image 77
Syed Qasim Ahmed Avatar answered Sep 25 '22 05:09

Syed Qasim Ahmed