In the code below, the total weight in the parent linear layout is less than the total weight of the its children.So I expect the scroll to work.The first children covers the entire screen.The other child is below the screen, but no scroll.
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
tools:context=".ActivityHome">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp"
android:orientation="vertical"
android:weightSum="4">
<!--First children-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="13"
android:orientation="vertical">
</LinearLayout>
<!--Second children-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>
</ScrollView>
I just have to work with layout_height.How can I do that?