Android ScrollView and buttons at bottom of the screen

Just created and tested it. Looks like you want.

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

    <LinearLayout
            android:id="@+id/buttons"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:gravity="center"
            android:layout_alignParentBottom="true">
        <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Custom Button1"/>
        <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Custom Button2"/>
    </LinearLayout>

    <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@id/buttons">
         <!--Scrollable content here-->
        <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">                
            <TextView
                    android:layout_height="wrap_content"
                    android:layout_width="wrap_content"
                    android:text="test text"
                    android:textSize="40dp"/>
        </LinearLayout>
    </ScrollView>

</RelativeLayout>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)