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

    <ScrollView
        android:id="@+id/sl_root"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:fillViewport="true" >

        <LinearLayout
            android:id="@+id/ll_root"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:orientation="vertical">

            <TextView
                android:id="@+id/tv_empty"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:gravity="center_horizontal"
                android:text="No record in this page"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/ll_refresh"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"

                android:background="#FFF5F5F5"
                android:gravity="center_horizontal"
                android:orientation="vertical"
                android:visibility="gone">

                <TextView
                    android:id="@+id/tv_ver"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center_horizontal"
                    android:text="Failed to get records\nTap Refresh button to retry"
                    android:textAppearance="?android:attr/textAppearanceLarge" />

                <Button
                    android:id="@+id/btn_refresh"
                    style="@android:attr/buttonBarButtonStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:drawableLeft="@android:drawable/ic_popup_sync"
                    android:text="Refresh" />
            </LinearLayout>
        </LinearLayout>
    </ScrollView>

    <RelativeLayout
        android:id="@+id/status"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:orientation="vertical"
        android:visibility="gone" >

        <TextView
            android:id="@+id/status_message"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/progressbar"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="16dp"
            android:text="Loading..."
            android:textAppearance="?android:attr/textAppearanceMedium" />

        <ProgressBar
            android:id="@+id/progressbar"
            style="?android:attr/progressBarStyleLarge"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:layout_marginTop="41dp" />
    </RelativeLayout>

</RelativeLayout>