• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17<!-- Demonstrates implementation of a DeviceAdmin. -->
18
19<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
20    android:orientation="vertical" android:padding="4dip"
21    android:gravity="center_horizontal"
22    android:layout_width="match_parent" android:layout_height="match_parent">
23
24    <TextView
25        android:layout_width="match_parent" android:layout_height="wrap_content"
26        android:layout_weight="0"
27        android:paddingBottom="4dip"
28        android:text="@string/sample_device_admin_summary"/>
29
30    <LinearLayout android:orientation="horizontal" android:gravity="center"
31        android:layout_width="match_parent" android:layout_height="wrap_content">
32
33        <Button android:id="@+id/enable"
34            android:layout_width="wrap_content" android:layout_height="wrap_content"
35            android:text="@string/enable_admin">
36            <requestFocus />
37        </Button>
38
39        <Button android:id="@+id/disable"
40            android:layout_width="wrap_content" android:layout_height="wrap_content"
41            android:text="@string/disable_admin">
42        </Button>
43
44    </LinearLayout>
45
46    <LinearLayout android:orientation="horizontal" android:gravity="center"
47        android:layout_width="match_parent" android:layout_height="wrap_content">
48
49        <Spinner android:id="@+id/password_quality"
50            android:layout_width="wrap_content"
51            android:layout_height="wrap_content"
52            android:drawSelectorOnTop="true"
53            android:prompt="@string/password_quality">
54        </Spinner>
55
56        <EditText android:id="@+id/password_length"
57            android:layout_width="wrap_content"
58            android:layout_height="wrap_content"
59            android:hint="@string/password_length_hint"
60            android:inputType="number">
61        </EditText>
62
63    </LinearLayout>
64
65    <Button android:id="@+id/set_password"
66        android:layout_width="wrap_content" android:layout_height="wrap_content"
67        android_layout_gravity="east|center_vertical"
68        android:text="@string/set_password">
69    </Button>
70
71    <LinearLayout android:orientation="horizontal" android:gravity="center"
72        android:layout_width="match_parent" android:layout_height="wrap_content">
73
74        <EditText android:id="@+id/password"
75            android:layout_width="wrap_content"
76            android:layout_height="wrap_content"
77            android:layout_weight="1"
78            android:hint="@string/password_hint"
79            android:freezesText="true">
80        </EditText>
81
82        <Button android:id="@+id/reset_password"
83            android:layout_width="wrap_content" android:layout_height="wrap_content"
84            android:layout_weight="0"
85            android:text="@string/reset_password">
86        </Button>
87
88    </LinearLayout>
89
90    <LinearLayout android:orientation="horizontal" android:gravity="center"
91        android:layout_width="match_parent" android:layout_height="wrap_content">
92
93        <EditText android:id="@+id/max_failed_pw"
94            android:layout_width="wrap_content"
95            android:layout_height="wrap_content"
96            android:hint="@string/max_failed_pw_hint"
97            android:inputType="number">
98        </EditText>
99
100    </LinearLayout>
101
102    <Button android:id="@+id/force_lock"
103        android:layout_width="wrap_content" android:layout_height="wrap_content"
104        android:layout_weight="0"
105        android:text="@string/force_lock">
106    </Button>
107
108    <LinearLayout android:orientation="horizontal" android:gravity="center"
109        android:layout_width="match_parent" android:layout_height="wrap_content">
110
111        <Button android:id="@+id/wipe_data"
112            android:layout_width="wrap_content" android:layout_height="wrap_content"
113            android:layout_weight="0"
114            android:text="@string/wipe_data">
115        </Button>
116
117        <Button android:id="@+id/wipe_all_data"
118            android:layout_width="wrap_content" android:layout_height="wrap_content"
119            android:layout_weight="0"
120            android:text="@string/wipe_all_data">
121        </Button>
122
123    </LinearLayout>
124
125    <LinearLayout android:orientation="horizontal" android:gravity="center"
126        android:layout_width="match_parent" android:layout_height="wrap_content">
127
128        <EditText android:id="@+id/timeout"
129            android:layout_width="wrap_content"
130            android:layout_height="wrap_content"
131            android:layout_weight="1"
132            android:hint="@string/timeout_hint"
133            android:inputType="number"
134            android:freezesText="true">
135        </EditText>
136
137        <Button android:id="@+id/set_timeout"
138            android:layout_width="wrap_content" android:layout_height="wrap_content"
139            android:layout_weight="0"
140            android:text="@string/set_timeout_label">
141        </Button>
142
143    </LinearLayout>
144
145</LinearLayout>
146
147