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 127 <RadioGroup 128 android:id="@+id/select_target_radio" 129 android:layout_width="fill_parent" 130 android:layout_height="wrap_content" 131 android:orientation="horizontal" 132 android:layout_below="@id/alpha_seek_bar"> 133 <RadioButton 134 android:id="@+id/resize_card_view" 135 android:layout_width="wrap_content" 136 android:layout_height="wrap_content" 137 android:textColor="@android:color/black" 138 android:text="@string/card_view_resize_card_view" 139 android:checked="true"/> 140 <RadioButton 141 android:id="@+id/resize_content" 142 android:layout_width="wrap_content" 143 android:layout_height="wrap_content" 144 android:textColor="@android:color/black" 145 android:text="@string/card_view_resize_content"/> 146 </RadioGroup> 147 148 </RelativeLayout> 149 <RelativeLayout android:layout_width="fill_parent" 150 android:layout_height="match_parent"> 151 <android.support.v7.widget.CardView 152 android:id="@+id/card_view" 153 android:layout_width="wrap_content" 154 android:layout_height="wrap_content" 155 card_view:cardElevation="10dp"> 156 <TextView 157 android:id="@+id/info_text" 158 android:textColor="@android:color/black" 159 android:layout_width="match_parent" 160 android:layout_height="match_parent" /> 161 </android.support.v7.widget.CardView> 162 <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" 163 android:text="@string/card_view_sample_text" 164 android:textColor="@android:color/black" 165 android:layout_toRightOf="@id/card_view" 166 android:layout_alignTop="@id/card_view"/> 167 </RelativeLayout> 168 169 </LinearLayout> 170