Q:

Android: ScrollView with text scrolling over imageview

I'm trying to setup text to initially start under an image and step over it and cover as you scroll up.  
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.rcarb.testlayout. MainActivity">

<ImageView
    android:layout_width="300dp"
    android:layout_height="300dp"
    android:src="@drawable/ic_android_black_24dp" />

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingTop="300dp">

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

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="HELLO"
            android:textSize="50sp" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="HELLO"
            android:textSize="50sp" /> //More textviews

The text keeps disappearing behind the imageview or at the padding border of the scrollview.  I was under the impression that if you add padding to the top of the scrollview it would add to the body of the scrollview not a thicker border. 
https://github.com/rcarbal/TestLayout
Thank you in advance. 

A:

Even when you scroll, the padding of 300dp stays, and that's why your textviews go behind the image. 
So instead of adding a padding to your scrollview, put an empty textview (or any layout) with the required height (300 dp here) inside the scrollview. 
Code goes something like this:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.rcarb.testlayout. MainActivity">

    <ImageView
        android:layout_width="300dp"
        android:layout_height="300dp"
        android:src="@drawable/ic_android_black_24dp" />

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

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

            <TextView
                android:layout_width="match_parent"
                android:layout_height="300dp" />

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="HELLO"
                    android:textSize="50sp" />
            </LinearLayout>
        </LinearLayout>
    </ScrollView>
</FrameLayout>

