Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3   XML for screen that holds various scroll views.
      4 -->
      5 
      6 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      7     android:layout_width="fill_parent"
      8     android:layout_height="fill_parent"
      9     android:fillViewport="true"
     10     android:orientation="vertical" >
     11 
     12   <LinearLayout
     13       android:layout_width="fill_parent"
     14       android:layout_height="wrap_content"
     15       android:orientation="vertical" >
     16 
     17     <TextView
     18         android:id="@+id/topLeft"
     19         android:layout_width="wrap_content"
     20         android:layout_height="wrap_content"
     21         android:layout_marginTop="10dp"
     22         android:text="top_left" />
     23 
     24     <ScrollView
     25         android:layout_width="fill_parent"
     26         android:layout_height="50dp"
     27         android:layout_marginTop="10dp"
     28         android:background="#FFDDDDDD"
     29         android:fillViewport="true"
     30         android:orientation="vertical" >
     31       <LinearLayout
     32           android:layout_width="wrap_content"
     33           android:layout_height="wrap_content"
     34           android:orientation="vertical" >
     35         <TextView
     36             android:id="@+id/doubleScroll"
     37             android:layout_width="wrap_content"
     38             android:layout_height="wrap_content"
     39             android:textColor="#000000"
     40             android:layout_marginTop="200dp"
     41             android:text="double_scroll" />
     42       </LinearLayout>
     43     </ScrollView>
     44 
     45     <!-- Keep this on bottom to test scrolling to views that are not showing. -->
     46     <!-- Huge top margin to guarantee this being out of view on large screen layout. -->
     47     <HorizontalScrollView
     48         android:layout_width="fill_parent"
     49         android:layout_height="50dp"
     50         android:background="#FFDDDDDD"
     51         android:layout_marginTop="3000dp">
     52       <LinearLayout
     53           android:layout_width="wrap_content"
     54           android:layout_height="wrap_content"
     55           android:orientation="horizontal" >
     56         <TextView
     57             android:id="@+id/bottomLeft"
     58             android:layout_width="wrap_content"
     59             android:layout_height="wrap_content"
     60             android:textColor="#000000"
     61             android:text="bottom_left" />
     62         <TextView
     63             android:id="@+id/bottomRight"
     64             android:layout_width="wrap_content"
     65             android:layout_height="wrap_content"
     66             android:layout_marginLeft="3000dp"
     67             android:textColor="#000000"
     68             android:text="bottom_right" />
     69       </LinearLayout>
     70     </HorizontalScrollView>
     71 
     72   </LinearLayout>
     73 </ScrollView>
     74