]> Pileus Git - ~andy/freeotp/blob - res/layout/manual.xml
Tablet UI rewrite
[~andy/freeotp] / res / layout / manual.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3    - FreeOTP
4    -
5    - Authors: Nathaniel McCallum <npmccallum@redhat.com>
6    -
7    - Copyright (C) 2013  Nathaniel McCallum, Red Hat
8    -
9    - Licensed under the Apache License, Version 2.0 (the "License");
10    - you may not use this file except in compliance with the License.
11    - You may obtain a copy of the License at
12    -
13    -     http://www.apache.org/licenses/LICENSE-2.0
14    -
15    - Unless required by applicable law or agreed to in writing, software
16    - distributed under the License is distributed on an "AS IS" BASIS,
17    - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18    - See the License for the specific language governing permissions and
19    - limitations under the License.
20    -->
21 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
22     android:layout_width="match_parent"
23     android:layout_height="match_parent" >
24     <TableLayout
25         android:layout_width="match_parent"
26         android:layout_height="wrap_content"
27         android:padding="16dp" >
28
29         <TableRow
30             android:layout_width="match_parent"
31             android:layout_height="48dp" >
32
33             <TextView
34                 android:layout_width="wrap_content"
35                 android:layout_height="match_parent"
36                 android:gravity="center_vertical|right"
37                 android:paddingRight="8dp"
38                 android:text="@string/issuer" />
39
40             <EditText
41                 android:id="@+id/issuer"
42                 android:layout_width="0dp"
43                 android:layout_height="match_parent"
44                 android:layout_weight="1"
45                 android:hint="jdoe@example.com"
46                 android:textAppearance="?android:attr/textAppearanceSmallInverse" />
47         </TableRow>
48
49         <TableRow
50             android:layout_width="match_parent"
51             android:layout_height="48dp" >
52
53             <TextView
54                 android:layout_width="wrap_content"
55                 android:layout_height="match_parent"
56                 android:gravity="center_vertical|right"
57                 android:paddingRight="8dp"
58                 android:text="@string/id" />
59
60             <EditText
61                 android:id="@+id/id"
62                 android:layout_width="0dp"
63                 android:layout_height="match_parent"
64                 android:layout_weight="1"
65                 android:hint="18c5d06cfcbd4927"
66                 android:textAppearance="?android:attr/textAppearanceSmallInverse" />
67         </TableRow>
68
69         <TableRow
70             android:layout_width="match_parent"
71             android:layout_height="48dp" >
72
73             <TextView
74                 android:layout_width="wrap_content"
75                 android:layout_height="match_parent"
76                 android:gravity="center_vertical|right"
77                 android:paddingRight="8dp"
78                 android:text="@string/secret" />
79
80             <EditText
81                 android:id="@+id/secret"
82                 android:layout_width="0dp"
83                 android:layout_height="match_parent"
84                 android:layout_weight="1"
85                 android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ234567="
86                 android:hint="(Base32 encoded)"
87                 android:textAppearance="?android:attr/textAppearanceSmall" />
88         </TableRow>
89
90         <View
91             android:layout_width="match_parent"
92             android:layout_height="1dp"
93             android:layout_marginBottom="4dp"
94             android:layout_marginTop="12dp"
95             android:background="?android:attr/dividerHorizontal" />
96
97         <TableRow
98             android:layout_width="match_parent"
99             android:layout_height="48dp" >
100
101             <TextView
102                 android:layout_width="wrap_content"
103                 android:layout_height="match_parent"
104                 android:gravity="center_vertical|right"
105                 android:paddingRight="8dp"
106                 android:text="@string/type" />
107
108             <Spinner
109                 android:id="@+id/type"
110                 android:layout_width="0dp"
111                 android:layout_height="match_parent"
112                 android:layout_weight="1"
113                 android:entries="@array/token_types" />
114         </TableRow>
115
116         <TableRow
117             android:layout_width="match_parent"
118             android:layout_height="48dp" >
119
120             <TextView
121                 android:layout_width="wrap_content"
122                 android:layout_height="match_parent"
123                 android:gravity="center_vertical|right"
124                 android:paddingRight="8dp"
125                 android:text="@string/algorithm" />
126
127             <Spinner
128                 android:id="@+id/algorithm"
129                 android:layout_width="0dp"
130                 android:layout_height="match_parent"
131                 android:layout_weight="1"
132                 android:entries="@array/algorithms" />
133         </TableRow>
134
135         <TableRow
136             android:layout_width="match_parent"
137             android:layout_height="48dp" >
138
139             <TextView
140                 android:id="@+id/interval_label"
141                 android:layout_width="wrap_content"
142                 android:layout_height="match_parent"
143                 android:gravity="center_vertical|right"
144                 android:paddingRight="8dp"
145                 android:text="@string/interval" />
146
147             <EditText
148                 android:id="@+id/interval"
149                 android:layout_width="0dp"
150                 android:layout_height="match_parent"
151                 android:layout_weight="1"
152                 android:inputType="number"
153                 android:text="30" />
154         </TableRow>
155
156         <TableRow
157             android:layout_width="match_parent"
158             android:layout_height="48dp" >
159
160             <TextView
161                 android:layout_width="wrap_content"
162                 android:layout_height="match_parent"
163                 android:gravity="center_vertical|right"
164                 android:paddingRight="8dp"
165                 android:text="@string/digits" />
166
167             <RadioGroup
168                 android:layout_width="0dp"
169                 android:layout_height="match_parent"
170                 android:layout_weight="1"
171                 android:orientation="horizontal" >
172
173                 <RadioButton
174                     android:id="@+id/digits6"
175                     android:layout_width="0dp"
176                     android:layout_height="match_parent"
177                     android:layout_weight="1"
178                     android:checked="true"
179                     android:text="6" />
180
181                 <RadioButton
182                     android:id="@+id/digits8"
183                     android:layout_width="0dp"
184                     android:layout_height="match_parent"
185                     android:layout_weight="1"
186                     android:text="8" />
187             </RadioGroup>
188         </TableRow>
189     </TableLayout>
190 </RelativeLayout>