1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2010 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<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
17            android:layout_width="match_parent"
18            android:layout_height="match_parent">
19    <LinearLayout
20         android:orientation="vertical"
21         android:layout_width="match_parent"
22         android:layout_height="wrap_content">
23
24        <Switch android:text="Standard switch"
25                android:layout_width="wrap_content"
26                android:layout_height="wrap_content"
27                android:layout_marginBottom="32dip" />
28
29        <Switch android:text="Default is on"
30                android:checked="true"
31                android:layout_width="wrap_content"
32                android:layout_height="wrap_content"
33                android:layout_marginBottom="32dip" />
34
35        <Switch android:id="@+id/monitored_switch"
36                android:text="Monitored switch"
37                android:layout_width="wrap_content"
38                android:layout_height="wrap_content"
39                android:layout_marginBottom="32dip" />
40
41        <Switch android:text="Customized text"
42                android:layout_width="wrap_content"
43                android:layout_height="wrap_content"
44                android:textOn="YES"
45                android:textOff="NO"
46                android:layout_marginBottom="32dip" />
47
48        <Switch android:text="This is an example of a switch with a lot of text in it. It may end up wrapping to another line. The switch will be pinned at the top."
49                android:singleLine="false"
50                android:layout_width="300dip"
51                android:layout_height="wrap_content"
52                android:gravity="top|left"
53                android:layout_marginBottom="32dip" />
54
55        <Switch android:text="This is an example of a switch with a lot of text in it. It may end up wrapping to another line. The switch will be vertically centered."
56                android:singleLine="false"
57                android:layout_width="300dip"
58                android:layout_height="wrap_content"
59                android:gravity="center_vertical|left"
60                android:layout_marginBottom="32dip" />
61
62        <Switch android:text="This is an example of a switch with a lot of text in it. It may end up wrapping to another line. The switch will be pinned at the bottom."
63                android:singleLine="false"
64                android:layout_width="300dip"
65                android:layout_height="wrap_content"
66                android:gravity="bottom|left"
67                android:layout_marginBottom="32dip" />
68
69        <Switch android:text="Switch with match_parent width"
70                android:layout_width="match_parent"
71                android:layout_height="wrap_content"
72                android:layout_marginBottom="32dip" />
73
74        <TextView android:text="Standalone switch below:"
75                  android:layout_width="wrap_content"
76                  android:layout_height="wrap_content" />
77
78        <Switch android:layout_width="wrap_content"
79                android:layout_height="wrap_content" />
80
81    </LinearLayout>
82</ScrollView>
83