Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3      Copyright (C) 2016 The Android Open Source Project
      4 
      5      Licensed under the Apache License, Version 2.0 (the "License");
      6      you may not use this file except in compliance with the License.
      7      You may obtain a copy of the License at
      8 
      9           http://www.apache.org/licenses/LICENSE-2.0
     10 
     11      Unless required by applicable law or agreed to in writing, software
     12      distributed under the License is distributed on an "AS IS" BASIS,
     13      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14      See the License for the specific language governing permissions and
     15      limitations under the License.
     16 -->
     17 
     18 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     19     android:layout_width="match_parent"
     20     android:layout_height="match_parent"
     21     android:orientation="vertical" >
     22 
     23     <LinearLayout
     24         android:layout_width="match_parent"
     25         android:layout_height="wrap_content"
     26         android:orientation="vertical"
     27         android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
     28         android:paddingRight="?android:attr/listPreferredItemPaddingRight">
     29 
     30         <Space
     31             android:layout_width="wrap_content"
     32             android:layout_height="16dp" />
     33 
     34         <LinearLayout
     35             android:layout_width="match_parent"
     36             android:layout_height="wrap_content"
     37             android:orientation="vertical"
     38             android:background="@drawable/card_background"
     39             android:paddingTop="24dp"
     40             android:padding="16dp"
     41             android:elevation="2dp">
     42 
     43             <TextView
     44                 android:layout_width="wrap_content"
     45                 android:layout_height="wrap_content"
     46                 android:text="@string/controls_header_buttons"
     47                 style="@android:style/TextAppearance.Material.Title" />
     48 
     49             <Space
     50                 android:layout_width="wrap_content"
     51                 android:layout_height="16dp" />
     52 
     53             <Button
     54                 android:id="@+id/button"
     55                 android:layout_width="wrap_content"
     56                 android:layout_height="wrap_content"
     57                 android:text="@string/controls_button" />
     58 
     59             <Button
     60                 android:id="@+id/button_borderless"
     61                 android:layout_width="wrap_content"
     62                 android:layout_height="wrap_content"
     63                 android:text="@string/controls_button_borderless"
     64                 style="@android:style/Widget.Material.Button.Borderless" />
     65 
     66             <Button
     67                 android:id="@+id/button_colored"
     68                 android:layout_width="wrap_content"
     69                 android:layout_height="wrap_content"
     70                 android:text="@string/controls_button_colored"
     71                 style="@android:style/Widget.Material.Button.Colored" />
     72 
     73             <Button
     74                 android:id="@+id/button_borderless_colored"
     75                 android:layout_width="wrap_content"
     76                 android:layout_height="wrap_content"
     77                 android:text="@string/controls_button_borderless_colored"
     78                 style="@android:style/Widget.Material.Button.Borderless.Colored" />
     79         </LinearLayout>
     80 
     81         <Space
     82             android:layout_width="wrap_content"
     83             android:layout_height="16dp" />
     84 
     85         <LinearLayout
     86             android:layout_width="match_parent"
     87             android:layout_height="wrap_content"
     88             android:orientation="vertical"
     89             android:background="@drawable/card_background"
     90             android:paddingTop="24dp"
     91             android:padding="16dp"
     92             android:elevation="2dp">
     93 
     94             <TextView
     95                 android:layout_width="wrap_content"
     96                 android:layout_height="wrap_content"
     97                 android:text="@string/controls_header_compound_buttons"
     98                 style="@android:style/TextAppearance.Material.Title" />
     99 
    100             <Space
    101                 android:layout_width="wrap_content"
    102                 android:layout_height="16dp" />
    103 
    104             <Switch
    105                 android:layout_width="wrap_content"
    106                 android:layout_height="wrap_content"
    107                 android:text="@string/controls_switch" />
    108 
    109             <CheckBox
    110                 android:id="@+id/check1"
    111                 android:layout_width="wrap_content"
    112                 android:layout_height="wrap_content"
    113                 android:text="@string/controls_1_checkbox_1" />
    114 
    115             <CheckBox
    116                 android:id="@+id/check2"
    117                 android:layout_width="wrap_content"
    118                 android:layout_height="wrap_content"
    119                 android:text="@string/controls_1_checkbox_2" />
    120 
    121             <RadioGroup
    122                 android:layout_width="match_parent"
    123                 android:layout_height="wrap_content"
    124                 android:orientation="vertical" >
    125 
    126                 <RadioButton
    127                     android:id="@+id/radio1"
    128                     android:layout_width="wrap_content"
    129                     android:layout_height="wrap_content"
    130                     android:text="@string/controls_1_radiobutton_1" />
    131 
    132                 <RadioButton
    133                     android:id="@+id/radio2"
    134                     android:layout_width="wrap_content"
    135                     android:layout_height="wrap_content"
    136                     android:text="@string/controls_1_radiobutton_2" />
    137             </RadioGroup>
    138 
    139             <CheckBox
    140                 android:id="@+id/star"
    141                 style="?android:attr/starStyle"
    142                 android:layout_width="wrap_content"
    143                 android:layout_height="wrap_content"
    144                 android:text="@string/controls_1_star" />
    145 
    146             <ToggleButton
    147                 android:id="@+id/toggle1"
    148                 android:layout_width="wrap_content"
    149                 android:layout_height="wrap_content" />
    150 
    151             <ToggleButton
    152                 android:id="@+id/toggle2"
    153                 android:layout_width="wrap_content"
    154                 android:layout_height="wrap_content" />
    155         </LinearLayout>
    156 
    157         <Space
    158             android:layout_width="wrap_content"
    159             android:layout_height="16dp" />
    160 
    161         <LinearLayout
    162             android:layout_width="match_parent"
    163             android:layout_height="wrap_content"
    164             android:orientation="vertical"
    165             android:background="@drawable/card_background"
    166             android:paddingTop="24dp"
    167             android:padding="16dp"
    168             android:elevation="2dp">
    169 
    170             <TextView
    171                 android:layout_width="wrap_content"
    172                 android:layout_height="wrap_content"
    173                 android:text="@string/controls_header_spinners"
    174                 style="@android:style/TextAppearance.Material.Title" />
    175 
    176             <Space
    177                 android:layout_width="wrap_content"
    178                 android:layout_height="16dp" />
    179 
    180             <TextView
    181                 android:layout_width="wrap_content"
    182                 android:layout_height="wrap_content"
    183                 android:text="@string/controls_spinner"
    184                 style="@android:style/TextAppearance.Material.Body1" />
    185 
    186             <Spinner
    187                 android:id="@+id/spinner"
    188                 android:layout_width="wrap_content"
    189                 android:layout_height="wrap_content"
    190                 android:entries="@array/planets"
    191                 android:drawSelectorOnTop="true" />
    192 
    193             <Space
    194                 android:layout_width="wrap_content"
    195                 android:layout_height="8dp" />
    196 
    197             <TextView
    198                 android:layout_width="wrap_content"
    199                 android:layout_height="wrap_content"
    200                 android:text="@string/controls_spinner_underlined"
    201                 style="@android:style/TextAppearance.Material.Body1" />
    202 
    203             <Spinner
    204                 android:id="@+id/spinner_underlined"
    205                 android:layout_width="wrap_content"
    206                 android:layout_height="wrap_content"
    207                 android:entries="@array/planets"
    208                 style="@android:style/Widget.Material.Spinner.Underlined" />
    209         </LinearLayout>
    210 
    211         <Space
    212             android:layout_width="wrap_content"
    213             android:layout_height="16dp" />
    214 
    215         <LinearLayout
    216             android:layout_width="match_parent"
    217             android:layout_height="wrap_content"
    218             android:orientation="vertical"
    219             android:background="@drawable/card_background"
    220             android:paddingTop="24dp"
    221             android:padding="16dp"
    222             android:elevation="2dp">
    223 
    224             <TextView
    225                 android:layout_width="wrap_content"
    226                 android:layout_height="wrap_content"
    227                 android:text="@string/controls_header_seek_bars"
    228                 style="@android:style/TextAppearance.Material.Title" />
    229 
    230             <Space
    231                 android:layout_width="wrap_content"
    232                 android:layout_height="16dp" />
    233 
    234             <TextView
    235                 android:layout_width="wrap_content"
    236                 android:layout_height="wrap_content"
    237                 android:text="@string/controls_seek_bar"
    238                 style="@android:style/TextAppearance.Material.Body1" />
    239 
    240             <SeekBar
    241                 android:id="@+id/seekbar"
    242                 android:layout_width="200dp"
    243                 android:layout_height="48dp" />
    244 
    245             <Space
    246                 android:layout_width="wrap_content"
    247                 android:layout_height="8dp" />
    248 
    249             <TextView
    250                 android:layout_width="wrap_content"
    251                 android:layout_height="wrap_content"
    252                 android:max="7"
    253                 android:text="@string/controls_seek_bar_discrete"
    254                 style="@android:style/TextAppearance.Material.Body1" />
    255 
    256             <SeekBar
    257                 android:id="@+id/seekbar_discrete"
    258                 android:layout_width="200dp"
    259                 android:layout_height="48dp"
    260                 android:max="7"
    261                 style="@android:style/Widget.Material.SeekBar.Discrete" />
    262         </LinearLayout>
    263 
    264         <Space
    265             android:layout_width="wrap_content"
    266             android:layout_height="16dp" />
    267 
    268         <LinearLayout
    269             android:layout_width="match_parent"
    270             android:layout_height="wrap_content"
    271             android:orientation="vertical"
    272             android:background="@drawable/card_background"
    273             android:paddingTop="24dp"
    274             android:padding="16dp"
    275             android:elevation="2dp">
    276 
    277             <TextView
    278                 android:layout_width="wrap_content"
    279                 android:layout_height="wrap_content"
    280                 android:text="@string/controls_header_text_fields"
    281                 style="@android:style/TextAppearance.Material.Title" />
    282 
    283             <Space
    284                 android:layout_width="wrap_content"
    285                 android:layout_height="16dp" />
    286 
    287             <EditText
    288                 android:id="@+id/edit"
    289                 android:layout_width="200dp"
    290                 android:layout_height="wrap_content"
    291                 android:layout_weight="1" />
    292 
    293             <Space
    294                 android:layout_width="wrap_content"
    295                 android:layout_height="16dp" />
    296 
    297             <EditText
    298                 android:id="@+id/edit2"
    299                 android:layout_width="200dp"
    300                 android:layout_height="wrap_content"
    301                 android:layout_weight="1" />
    302         </LinearLayout>
    303 
    304         <Space
    305             android:layout_width="wrap_content"
    306             android:layout_height="16dp" />
    307 
    308         <LinearLayout
    309             android:layout_width="match_parent"
    310             android:layout_height="wrap_content"
    311             android:orientation="vertical"
    312             android:background="@drawable/card_background"
    313             android:paddingTop="24dp"
    314             android:paddingLeft="16dp"
    315             android:paddingRight="16dp"
    316             android:paddingBottom="16dp"
    317             android:elevation="2dp">
    318 
    319             <TextView
    320                 android:layout_width="wrap_content"
    321                 android:layout_height="wrap_content"
    322                 android:text="@string/controls_header_text_appearances"
    323                 style="@android:style/TextAppearance.Material.Title" />
    324 
    325             <Space
    326                 android:layout_width="wrap_content"
    327                 android:layout_height="16dp" />
    328 
    329             <TextView
    330                 android:layout_width="match_parent"
    331                 android:layout_height="wrap_content"
    332                 android:layout_marginTop="5dip"
    333                 android:focusable="true"
    334                 android:text="@string/textColorPrimary"
    335                 android:textAppearance="@android:style/TextAppearance.Material.Body1" />
    336 
    337             <Space
    338                 android:layout_width="wrap_content"
    339                 android:layout_height="8dp" />
    340 
    341             <TextView
    342                 android:layout_width="match_parent"
    343                 android:layout_height="wrap_content"
    344                 android:layout_marginTop="5dip"
    345                 android:focusable="true"
    346                 android:text="@string/textColorSecondary"
    347                 android:textAppearance="@android:style/TextAppearance.Material.Body1"
    348                 android:textColor="?android:attr/textColorSecondary" />
    349 
    350             <Space
    351                 android:layout_width="wrap_content"
    352                 android:layout_height="8dp" />
    353 
    354             <TextView
    355                 android:layout_width="match_parent"
    356                 android:layout_height="wrap_content"
    357                 android:layout_marginTop="5dip"
    358                 android:focusable="true"
    359                 android:text="@string/textColorTertiary"
    360                 android:textAppearance="@android:style/TextAppearance.Material.Body1"
    361                 android:textColor="?android:attr/textColorTertiary" />
    362 
    363             <Space
    364                 android:layout_width="wrap_content"
    365                 android:layout_height="8dp" />
    366 
    367             <TextView
    368                 style="?android:attr/listSeparatorTextViewStyle"
    369                 android:layout_marginTop="5dip"
    370                 android:text="@string/listSeparatorTextViewStyle" />
    371         </LinearLayout>
    372 
    373         <Space
    374             android:layout_width="wrap_content"
    375             android:layout_height="16dp" />
    376     </LinearLayout>
    377 </ScrollView>
    378