• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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        <RadioGroup
136                android:id="@+id/select_bg_color_radio"
137                android:layout_toRightOf="@id/color_label"
138                android:layout_alignTop="@id/color_label"
139                android:layout_width="fill_parent"
140                android:layout_height="wrap_content"
141                android:orientation="horizontal"
142                android:layout_below="@id/alpha_seek_bar">
143            <RadioButton
144                    android:id="@+id/def"
145                    android:layout_width="40dp"
146                    android:layout_height="wrap_content"
147                    android:background="@color/cardview_light_background"
148                    android:checked="true"/>
149            <RadioButton
150                    android:id="@+id/yellow"
151                    android:layout_width="40dp"
152                    android:layout_height="wrap_content"
153                    android:background="@color/card_yellow"/>
154            <RadioButton
155                    android:id="@+id/aquatic"
156                    android:layout_width="40dp"
157                    android:layout_height="wrap_content"
158                    android:background="@color/card_aquatic"/>
159            <RadioButton
160                    android:id="@+id/classic"
161                    android:layout_width="40dp"
162                    android:layout_height="wrap_content"
163                    android:background="@color/card_classic"/>
164            <RadioButton
165                    android:id="@+id/sunbrite"
166                    android:layout_width="40dp"
167                    android:layout_height="wrap_content"
168                    android:background="@color/card_sunbrite"/>
169            <RadioButton
170                    android:id="@+id/tropical"
171                    android:layout_width="40dp"
172                    android:layout_height="wrap_content"
173                    android:background="@color/card_tropical"/>
174        </RadioGroup>
175        <RadioGroup
176                android:id="@+id/select_target_radio"
177                android:layout_width="fill_parent"
178                android:layout_height="wrap_content"
179                android:orientation="horizontal"
180                android:layout_below="@id/color_label">
181            <RadioButton
182                    android:id="@+id/resize_card_view"
183                    android:layout_width="wrap_content"
184                    android:layout_height="wrap_content"
185                    android:textColor="@android:color/black"
186                    android:text="@string/card_view_resize_card_view"
187                    android:checked="true"/>
188            <RadioButton
189                    android:id="@+id/resize_content"
190                    android:layout_width="wrap_content"
191                    android:layout_height="wrap_content"
192                    android:textColor="@android:color/black"
193                    android:text="@string/card_view_resize_content"/>
194        </RadioGroup>
195    </RelativeLayout>
196    <RelativeLayout android:layout_width="fill_parent"
197                    android:layout_height="match_parent">
198        <android.support.v7.widget.CardView
199                android:id="@+id/card_view"
200                android:layout_width="wrap_content"
201                android:layout_height="wrap_content"
202                card_view:cardElevation="10dp">
203            <TextView
204                    android:id="@+id/info_text"
205                    android:text="@string/card_view"
206                    android:textColor="@android:color/black"
207                    android:layout_width="wrap_content"
208                    android:layout_height="wrap_content" />
209        </android.support.v7.widget.CardView>
210        <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
211                  android:text="@string/card_view_sample_text"
212                  android:textColor="@android:color/black"
213                android:layout_toRightOf="@id/card_view"
214                android:layout_alignTop="@id/card_view"/>
215    </RelativeLayout>
216
217</LinearLayout>
218