<?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
This line output should have android:layout_height="wrap_content" .
The reason for this is that if the child of the scrollview is the same size as the scrollview itself (both match_parent for height), this means that there is nothing to scroll because they are the same size and the scrollview will only look like a screen.
If linearlayout has wrap_content height, then the height is not related to the height of the screen, and scrollview will be able to scroll through it.
Just remember that scrollview can have only one direct child, and this child requires android:layout_height="wrap_content"
source share