I have a collapsing layout with tab layout and view pager.
Inside the viewpager, in the first tab, I have a NestedScrollView with a lot of children. The problem is: the NestedScrollView is not respecting the children height.
<android.support.v4.widget.NestedScrollView
android:id="@+id/nestedScrollView"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:isScrollContainer="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical"
android:fillViewport="true"
android:background="@color/colorBlack"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="@+id/relative"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:paddingRight="16dp"
android:paddingLeft="16dp"
android:clipToPadding="false">
.... Lots of children
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
The last TextView of this LinearLayout doesn't show. If I put a margin bottom in the TextView of 50dp, it does show.
What I'm missing?
Full code: https://gist.github.com/guuilp/81f06c8a5581d2a9ce0a19dcf6c12ccc