Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3 /* //device/tests/ComplexLayout/res/layout/complex_layout.xml
      4 **
      5 ** Copyright 2007, The Android Open Source Project
      6 **
      7 ** Licensed under the Apache License, Version 2.0 (the "License");
      8 ** you may not use this file except in compliance with the License.
      9 ** You may obtain a copy of the License at
     10 **
     11 **     http://www.apache.org/licenses/LICENSE-2.0
     12 **
     13 ** Unless required by applicable law or agreed to in writing, software
     14 ** distributed under the License is distributed on an "AS IS" BASIS,
     15 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 ** See the License for the specific language governing permissions and
     17 ** limitations under the License.
     18 */
     19 -->
     20 
     21 <!-- This file describes the layout of the main ComplexLayout activity
     22      user interface.
     23  -->
     24 
     25 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     26     android:layout_width="match_parent"
     27     android:layout_height="match_parent">
     28 
     29 <!--    <TabHost
     30         android:layout_width="match_parent"
     31         android:layout_height="200dip">
     32     </TabHost>
     33 
     34     <GridView
     35         android:layout_width="match_parent"
     36         android:layout_height="200dip"
     37         android:numColumns="5">
     38     </GridView> -->
     39 
     40     <LinearLayout
     41         android:layout_width="match_parent"
     42         android:layout_height="200dip"
     43         android:orientation="vertical">
     44         
     45         <TextView
     46             android:layout_width="match_parent"
     47             android:layout_height="wrap_content"
     48             android:text="@string/header_absolute"/>
     49 
     50         <AbsoluteLayout
     51             android:layout_width="match_parent"
     52             android:layout_height="wrap_content">
     53 
     54             <TextView
     55                 android:layout_width="match_parent"
     56                 android:layout_height="wrap_content"
     57                 android:layout_x="0dip"
     58                 android:layout_y="0dip"
     59                 android:background="@color/red"
     60                 android:text="@string/test_short_paragraph"/>
     61             
     62             <TextView
     63                 android:layout_width="wrap_content"
     64                 android:layout_height="wrap_content"
     65                 android:layout_x="0dip"
     66                 android:layout_y="0dip"
     67                 android:background="@color/gray0"
     68                 android:text="@string/test_word"/>
     69             <TextView
     70                 android:layout_width="wrap_content"
     71                 android:layout_height="wrap_content"
     72                 android:layout_x="8dip"
     73                 android:layout_y="4dip"
     74                 android:background="@color/gray1"
     75                 android:text="@string/test_word"/>
     76              <TextView
     77                 android:layout_width="wrap_content"
     78                 android:layout_height="wrap_content"
     79                 android:layout_x="16dip"
     80                 android:layout_y="8dip"
     81                 android:background="@color/gray2"
     82                 android:text="@string/test_word"/>
     83              <TextView
     84                 android:layout_width="wrap_content"
     85                 android:layout_height="wrap_content"
     86                 android:layout_x="24dip"
     87                 android:layout_y="12dip"
     88                 android:background="@color/gray3"
     89                 android:text="@string/test_word"/>
     90             <TextView
     91                 android:layout_width="wrap_content"
     92                 android:layout_height="wrap_content"
     93                 android:layout_x="32dip"
     94                 android:layout_y="16dip"
     95                 android:background="@color/gray4"
     96                 android:text="@string/test_word"/>
     97              <TextView
     98                 android:layout_width="wrap_content"
     99                 android:layout_height="wrap_content"
    100                 android:layout_x="40dip"
    101                 android:layout_y="20dip"
    102                 android:background="@color/gray5"
    103                 android:text="@string/test_word"/>
    104             <TextView
    105                 android:layout_width="wrap_content"
    106                 android:layout_height="wrap_content"
    107                 android:layout_x="48dip"
    108                 android:layout_y="24dip"
    109                 android:background="@color/gray6"
    110                 android:text="@string/test_word"/>
    111              <TextView
    112                 android:layout_width="wrap_content"
    113                 android:layout_height="wrap_content"
    114                 android:layout_x="56dip"
    115                 android:layout_y="28dip"
    116                 android:background="@color/gray7"
    117                 android:text="@string/test_word"/>
    118             <TextView
    119                 android:layout_width="wrap_content"
    120                 android:layout_height="wrap_content"
    121                 android:layout_x="64dip"
    122                 android:layout_y="32dip"
    123                 android:background="@color/gray8"
    124                 android:text="@string/test_word"/>
    125              <TextView
    126                 android:layout_width="wrap_content"
    127                 android:layout_height="wrap_content"
    128                 android:layout_x="72dip"
    129                 android:layout_y="36dip"
    130                 android:background="@color/gray9"
    131                 android:text="@string/test_word"/>
    132             <TextView
    133                 android:layout_width="wrap_content"
    134                 android:layout_height="wrap_content"
    135                 android:layout_x="80dip"
    136                 android:layout_y="40dip"
    137                 android:background="@color/grayA"
    138                 android:text="@string/test_word"/>
    139              <TextView
    140                 android:layout_width="wrap_content"
    141                 android:layout_height="wrap_content"
    142                 android:layout_x="88dip"
    143                 android:layout_y="44dip"
    144                 android:background="@color/grayB"
    145                 android:text="@string/test_word"/>
    146             <TextView
    147                 android:layout_width="wrap_content"
    148                 android:layout_height="wrap_content"
    149                 android:layout_x="96dip"
    150                 android:layout_y="48dip"
    151                 android:background="@color/grayC"
    152                 android:text="@string/test_word"/>
    153              <TextView
    154                 android:layout_width="wrap_content"
    155                 android:layout_height="wrap_content"
    156                 android:layout_x="104dip"
    157                 android:layout_y="52dip"
    158                 android:background="@color/grayD"
    159                 android:text="@string/test_word"/>
    160             <TextView
    161                 android:layout_width="wrap_content"
    162                 android:layout_height="wrap_content"
    163                 android:layout_x="112dip"
    164                 android:layout_y="56dip"
    165                 android:background="@color/grayE"
    166                 android:text="@string/test_word"/>
    167             <TextView
    168                 android:layout_width="wrap_content"
    169                 android:layout_height="wrap_content"
    170                 android:layout_x="120dip"
    171                 android:layout_y="60dip"
    172                 android:background="@color/grayF"
    173                 android:text="@string/test_word"/>
    174 
    175         </AbsoluteLayout>
    176 
    177         <TextView
    178             android:layout_width="match_parent"
    179             android:layout_height="wrap_content"
    180             android:text="@string/header_relative"/>
    181 
    182         <RelativeLayout
    183             android:layout_width="match_parent"
    184             android:layout_height="wrap_content">
    185 
    186             <Button android:id="@+id/relative_button1"
    187                 android:layout_width="wrap_content"
    188                 android:layout_height="wrap_content"
    189                 android:text="@string/relative_button1"/>
    190             <Button android:id="@+id/relative_button2"
    191                 android:layout_width="wrap_content"
    192                 android:layout_height="wrap_content"
    193                 android:layout_below="@id/relative_button1"
    194                 android:text="@string/relative_button2"/>
    195             <Button android:id="@+id/relative_button3"
    196                 android:layout_width="wrap_content"
    197                 android:layout_height="wrap_content"
    198                 android:layout_below="@id/relative_button2"
    199                 android:text="@string/relative_button3"/>
    200             <Button android:id="@+id/relative_button4"
    201                 android:layout_width="wrap_content"
    202                 android:layout_height="wrap_content"
    203                 android:layout_below="@id/relative_button3"
    204                 android:text="@string/relative_button4"/>
    205 
    206             <TextView android:id="@+id/relative_text"
    207                 android:layout_width="wrap_content"
    208                 android:layout_height="wrap_content"
    209                 android:layout_toRightOf="@id/relative_button1"
    210                 android:background="@color/green"
    211                 android:text="@string/test_short_paragraph"/>
    212 
    213             <Button android:id="@+id/relative_button5"
    214                 android:layout_width="wrap_content"
    215                 android:layout_height="wrap_content"
    216                 android:layout_below="@id/relative_text"
    217                 android:layout_alignParentRight="true"
    218                 android:text="@string/relative_button5"/>
    219             <Button android:id="@+id/relative_button6"
    220                 android:layout_width="wrap_content"
    221                 android:layout_height="wrap_content"
    222                 android:layout_below="@id/relative_text"
    223                 android:layout_toLeftOf="@id/relative_button5"
    224                 android:text="@string/relative_button6"/>
    225             <Button android:id="@+id/relative_button7"
    226                 android:layout_width="wrap_content"
    227                 android:layout_height="wrap_content"
    228                 android:layout_below="@id/relative_text"
    229                 android:layout_toLeftOf="@id/relative_button6"
    230                 android:text="@string/relative_button7"/>
    231             <Button android:id="@+id/relative_button8"
    232                 android:layout_width="wrap_content"
    233                 android:layout_height="wrap_content"
    234                 android:layout_below="@id/relative_text"
    235                 android:layout_toLeftOf="@id/relative_button7"
    236                 android:text="@string/relative_button8"/>
    237 
    238         </RelativeLayout>
    239 
    240         <TextView
    241             android:layout_width="match_parent"
    242             android:layout_height="wrap_content"
    243             android:text="@string/header_linear"/>
    244 
    245         <LinearLayout
    246             android:layout_width="match_parent"
    247             android:layout_height="wrap_content"
    248             android:orientation="vertical">
    249 
    250             <LinearLayout
    251                 android:layout_width="match_parent"
    252                 android:layout_height="wrap_content"
    253                 android:orientation="horizontal">
    254 
    255                 <Button
    256                     android:layout_width="wrap_content"
    257                     android:layout_height="wrap_content"
    258                     android:text="@string/relative_button1"/>
    259                 <Button
    260                     android:layout_width="wrap_content"
    261                     android:layout_height="wrap_content"
    262                     android:text="@string/relative_button2"/>
    263                 <Button
    264                     android:layout_width="wrap_content"
    265                     android:layout_height="wrap_content"
    266                     android:text="@string/relative_button3"/>
    267                 <Button
    268                     android:layout_width="wrap_content"
    269                     android:layout_height="wrap_content"
    270                     android:text="@string/relative_button4"/>
    271 
    272             </LinearLayout>
    273 
    274             <EditText
    275                 android:layout_width="match_parent"
    276                 android:layout_height="wrap_content"/>
    277 
    278             <TextView
    279                 android:layout_width="match_parent"
    280                 android:layout_height="wrap_content"
    281                 android:background="@color/blue"
    282                 android:text="@string/test_long_paragraph"/>
    283 
    284         </LinearLayout>
    285 
    286     </LinearLayout>
    287 
    288 </ScrollView>
    289