Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2014 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8           http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     17               xmlns:card_view="http://schemas.android.com/apk/res-auto"
     18               android:layout_width="match_parent"
     19               android:layout_height="match_parent"
     20               android:background="#ffffffff"
     21               android:orientation="vertical">
     22     <RelativeLayout
     23             android:layout_marginLeft="10dp"
     24             android:layout_marginRight="10dp"
     25             android:orientation="vertical"
     26             android:layout_width="match_parent"
     27             android:layout_height="wrap_content">
     28         <TextView
     29                 android:layout_width="wrap_content"
     30                 android:layout_height="wrap_content"
     31                 android:textColor="@android:color/black"
     32                 android:id="@+id/radius_label"
     33                 android:layout_marginBottom="5dp"
     34                 android:text="@string/card_view_radius"/>
     35         <SeekBar
     36                 android:id="@+id/corner_radius_seek_bar"
     37                 android:max="100"
     38                 android:layout_width="match_parent"
     39                 android:layout_height="wrap_content"
     40                 android:layout_toRightOf="@id/radius_label"
     41                 android:layout_alignTop="@id/radius_label"/>
     42         <TextView
     43                 android:layout_width="wrap_content"
     44                 android:layout_height="wrap_content"
     45                 android:layout_marginBottom="5dp"
     46                 android:textColor="@android:color/black"
     47                 android:id="@+id/width_label"
     48                 android:text="@string/card_view_width"
     49                 android:layout_below="@id/radius_label"
     50                 android:layout_alignRight="@id/radius_label"/>
     51         <SeekBar
     52                 android:id="@+id/width_seek_bar"
     53                 android:max="600"
     54                 android:layout_width="match_parent"
     55                 android:layout_height="wrap_content"
     56                 android:layout_toRightOf="@id/width_label"
     57                 android:layout_alignTop="@id/width_label"/>
     58         <TextView
     59                 android:layout_width="wrap_content"
     60                 android:layout_height="wrap_content"
     61                 android:layout_marginBottom="5dp"
     62                 android:textColor="@android:color/black"
     63                 android:id="@+id/height_label"
     64                 android:text="@string/card_view_height"
     65                 android:layout_below="@id/width_label"
     66                 android:layout_alignRight="@id/width_label"/>
     67         <SeekBar
     68                 android:id="@+id/height_seek_bar"
     69                 android:max="600"
     70                 android:layout_width="match_parent"
     71                 android:layout_height="wrap_content"
     72                 android:layout_toRightOf="@id/height_label"
     73                 android:layout_alignTop="@id/height_label"/>
     74 
     75         <TextView
     76                 android:layout_width="wrap_content"
     77                 android:layout_height="wrap_content"
     78                 android:layout_marginBottom="5dp"
     79                 android:id="@+id/elevation_label"
     80                 android:textColor="@android:color/black"
     81                 android:text="@string/card_view_elevation"
     82                 android:layout_below="@id/height_label"
     83                 android:layout_alignRight="@id/height_label"/>
     84         <SeekBar
     85                 android:id="@+id/elevation_seek_bar"
     86                 android:max="50"
     87                 android:layout_width="match_parent"
     88                 android:layout_height="wrap_content"
     89                 android:layout_toRightOf="@id/elevation_label"
     90                 android:layout_alignTop="@id/elevation_label"/>
     91 
     92         <TextView
     93                 android:layout_width="wrap_content"
     94                 android:layout_height="wrap_content"
     95                 android:layout_marginBottom="5dp"
     96                 android:id="@+id/max_elevation_label"
     97                 android:textColor="@android:color/black"
     98                 android:text="@string/card_view_max_elevation"
     99                 android:layout_below="@id/elevation_label"
    100                 android:layout_alignRight="@id/elevation_label"/>
    101         <SeekBar
    102                 android:id="@+id/max_elevation_seek_bar"
    103                 android:max="60"
    104                 android:layout_width="match_parent"
    105                 android:layout_height="wrap_content"
    106                 android:layout_toRightOf="@id/max_elevation_label"
    107                 android:layout_alignTop="@id/max_elevation_label"/>
    108 
    109         <TextView
    110                 android:layout_width="wrap_content"
    111                 android:layout_height="wrap_content"
    112                 android:layout_marginBottom="5dp"
    113                 android:id="@+id/alpha_label"
    114                 android:textColor="@android:color/black"
    115                 android:text="@string/card_view_alpha"
    116                 android:layout_below="@id/max_elevation_label"
    117                 android:layout_alignRight="@id/max_elevation_label"/>
    118         <SeekBar
    119                 android:id="@+id/alpha_seek_bar"
    120                 android:max="255"
    121                 android:progress="255"
    122                 android:layout_width="match_parent"
    123                 android:layout_height="wrap_content"
    124                 android:layout_toRightOf="@id/alpha_label"
    125                 android:layout_alignTop="@id/alpha_label"/>
    126         <TextView
    127                 android:layout_width="wrap_content"
    128                 android:layout_height="wrap_content"
    129                 android:layout_marginBottom="5dp"
    130                 android:id="@+id/color_label"
    131                 android:textColor="@android:color/black"
    132                 android:text="@string/card_view_bg_color"
    133                 android:layout_below="@id/alpha_label"
    134                 android:layout_alignRight="@id/alpha_label"/>
    135 
    136         <ScrollView
    137                 android:layout_width="match_parent"
    138                 android:layout_height="wrap_content"
    139                 android:layout_below="@id/alpha_seek_bar"
    140                 android:layout_toRightOf="@id/color_label"
    141                 android:layout_alignParentRight="true"
    142                 android:layout_alignTop="@id/color_label">
    143 
    144             <RadioGroup
    145                     android:id="@+id/select_bg_color_radio"
    146                     android:layout_width="wrap_content"
    147                     android:layout_height="wrap_content"
    148                     android:orientation="horizontal">
    149                 <RadioButton
    150                         android:id="@+id/def"
    151                         android:layout_width="wrap_content"
    152                         android:layout_height="wrap_content"
    153                         android:background="@color/cardview_light_background"
    154                         android:checked="true"/>
    155                 <RadioButton
    156                         android:id="@+id/yellow"
    157                         android:layout_width="wrap_content"
    158                         android:layout_height="wrap_content"
    159                         android:background="@color/card_yellow"/>
    160                 <RadioButton
    161                         android:id="@+id/aquatic"
    162                         android:layout_width="wrap_content"
    163                         android:layout_height="wrap_content"
    164                         android:background="@color/card_aquatic"/>
    165                 <RadioButton
    166                         android:id="@+id/classic"
    167                         android:layout_width="wrap_content"
    168                         android:layout_height="wrap_content"
    169                         android:background="@color/card_classic"/>
    170                 <RadioButton
    171                         android:id="@+id/sunbrite"
    172                         android:layout_width="wrap_content"
    173                         android:layout_height="wrap_content"
    174                         android:background="@color/card_sunbrite"/>
    175                 <RadioButton
    176                         android:id="@+id/tropical"
    177                         android:layout_width="wrap_content"
    178                         android:layout_height="wrap_content"
    179                         android:background="@color/card_tropical"/>
    180                 <RadioButton
    181                         android:id="@+id/selector"
    182                         android:layout_width="wrap_content"
    183                         android:layout_height="wrap_content"
    184                         android:text="@string/cardview_background_selector_label"/>
    185             </RadioGroup>
    186         </ScrollView>
    187         <RadioGroup
    188                 android:id="@+id/select_target_radio"
    189                 android:layout_width="fill_parent"
    190                 android:layout_height="wrap_content"
    191                 android:orientation="horizontal"
    192                 android:layout_below="@id/color_label">
    193             <RadioButton
    194                     android:id="@+id/resize_card_view"
    195                     android:layout_width="wrap_content"
    196                     android:layout_height="wrap_content"
    197                     android:textColor="@android:color/black"
    198                     android:text="@string/card_view_resize_card_view"
    199                     android:checked="true"/>
    200             <RadioButton
    201                     android:id="@+id/resize_content"
    202                     android:layout_width="wrap_content"
    203                     android:layout_height="wrap_content"
    204                     android:textColor="@android:color/black"
    205                     android:text="@string/card_view_resize_content"/>
    206         </RadioGroup>
    207     </RelativeLayout>
    208     <RelativeLayout android:layout_width="fill_parent"
    209                     android:layout_height="match_parent">
    210         <android.support.v7.widget.CardView
    211                 android:id="@+id/card_view"
    212                 android:layout_width="wrap_content"
    213                 android:layout_height="wrap_content"
    214                 card_view:cardElevation="10dp"
    215                 android:clickable="true"
    216                 android:layout_margin="8dp">
    217             <TextView
    218                     android:id="@+id/info_text"
    219                     android:text="@string/card_view"
    220                     android:textColor="@android:color/black"
    221                     android:layout_width="wrap_content"
    222                     android:layout_height="wrap_content" />
    223         </android.support.v7.widget.CardView>
    224         <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
    225                   android:text="@string/card_view_sample_text"
    226                   android:textColor="@android:color/black"
    227                 android:layout_toRightOf="@id/card_view"
    228                 android:layout_alignTop="@id/card_view"/>
    229     </RelativeLayout>
    230 
    231 </LinearLayout>
    232