Pages

Sunday, May 12, 2013

Scroll view +footer


<RelativeLayout 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" >


<ScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_above="@+id/footer"
    android:background="#0000ff"
    android:fillViewport="true" >

  <TextView
        android:id="@+id/texthere"
        android:layout_width="160dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:gravity="center_vertical|center_horizontal"
        android:text="test test "
        android:textSize="35sp" >
    </TextView>
</ScrollView>

<RelativeLayout
    android:id="@+id/footer"
    android:layout_width="fill_parent"
    android:layout_height="100dp"
    android:background="#ffff00"
    android:layout_alignParentBottom="true">

    <TextView
        android:id="@+id/texthere2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="things in your footer here"
        android:textSize="20sp" />

</RelativeLayout>

</RelativeLayout>

No comments:

Post a Comment