If ScrollView only supports one direct child, how am I supposed to make a whole layout scrollable?

Just wrap your current LinearLayout with ScrollView. So it should be smth like this:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <ImageButton ... />
        <TextView ... />
        <TextView ... />
        <TextView ... />

    </LinearLayout>
</ScrollView>

Leave a Comment