1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2011 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    android:layout_width="match_parent"
18    android:layout_height="wrap_content"
19    android:orientation="vertical"
20    android:paddingTop="0dp"
21    android:paddingLeft="24dp"
22    android:paddingRight="24dp" >
23    <TextView
24        android:layout_width="match_parent"
25        android:layout_height="wrap_content"
26        android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
27        android:id="@+id/dialog_alert_subtitle"
28        android:text="@string/vpn_insecure_dialog_subtitle"
29        android:textColor="?android:attr/colorError"
30        android:visibility="gone"
31        android:includeFontPadding="false"
32        android:padding="0dp" />
33
34    <ScrollView
35            android:layout_width="match_parent"
36            android:layout_height="wrap_content">
37        <LinearLayout android:layout_width="match_parent"
38                android:layout_height="wrap_content"
39                android:orientation="vertical"
40                android:paddingTop="24dp">
41
42            <LinearLayout android:id="@+id/editor"
43                    android:layout_width="match_parent"
44                    android:layout_height="wrap_content"
45                    android:orientation="vertical"
46                    android:visibility="gone">
47
48                <TextView style="@style/vpn_label"
49                        android:text="@string/vpn_name"
50                        android:labelFor="@+id/name"/>
51                <EditText style="@style/vpn_value"
52                        android:id="@+id/name"
53                        android:inputType="textCapWords"/>
54
55                <TextView style="@style/vpn_label"
56                        android:text="@string/vpn_type"
57                        android:labelFor="@+id/type"/>
58                <Spinner style="@style/vpn_value"
59                        android:id="@+id/type"
60                        android:prompt="@string/vpn_type"
61                        android:entries="@array/vpn_types"/>
62
63                <TextView style="@style/vpn_label"
64                        android:text="@string/vpn_server"
65                        android:labelFor="@+id/server"/>
66                <EditText style="@style/vpn_value"
67                        android:id="@+id/server"/>
68
69                <LinearLayout android:id="@+id/options_ipsec_identity"
70                        android:layout_width="match_parent"
71                        android:layout_height="wrap_content"
72                        android:orientation="vertical"
73                        android:visibility="gone">
74                    <TextView style="@style/vpn_label"
75                            android:text="@string/vpn_ipsec_identifier"
76                            android:labelFor="@+id/ipsec_identifier"/>
77                    <EditText style="@style/vpn_value"
78                            android:id="@+id/ipsec_identifier"
79                            android:hint="@string/vpn_not_used"/>
80                </LinearLayout>
81
82                <LinearLayout android:id="@+id/ipsec_psk"
83                        android:layout_width="match_parent"
84                        android:layout_height="wrap_content"
85                        android:orientation="vertical"
86                        android:visibility="gone">
87                    <TextView style="@style/vpn_label"
88                            android:text="@string/vpn_ipsec_secret"
89                            android:labelFor="@+id/ipsec_secret"/>
90                    <EditText style="@style/vpn_value"
91                            android:id="@+id/ipsec_secret"
92                            android:password="true"/>
93                </LinearLayout>
94
95                <LinearLayout android:id="@+id/ipsec_user"
96                        android:layout_width="match_parent"
97                        android:layout_height="wrap_content"
98                        android:orientation="vertical"
99                        android:visibility="gone">
100                    <TextView style="@style/vpn_label"
101                            android:text="@string/vpn_ipsec_user_cert"
102                            android:labelFor="@+id/ipsec_user_cert"/>
103                    <Spinner style="@style/vpn_value"
104                            android:id="@+id/ipsec_user_cert"
105                            android:prompt="@string/vpn_ipsec_user_cert" />
106                </LinearLayout>
107
108                <LinearLayout android:id="@+id/ipsec_peer"
109                        android:layout_width="match_parent"
110                        android:layout_height="wrap_content"
111                        android:orientation="vertical"
112                        android:visibility="gone">
113                    <TextView style="@style/vpn_label"
114                            android:text="@string/vpn_ipsec_ca_cert"
115                            android:labelFor="@+id/ipsec_ca_cert"/>
116                    <Spinner style="@style/vpn_value"
117                            android:id="@+id/ipsec_ca_cert"
118                            android:prompt="@string/vpn_ipsec_ca_cert" />
119
120                    <TextView style="@style/vpn_label"
121                            android:text="@string/vpn_ipsec_server_cert"
122                            android:labelFor="@+id/ipsec_server_cert"/>
123                    <Spinner style="@style/vpn_value"
124                            android:id="@+id/ipsec_server_cert"
125                            android:prompt="@string/vpn_ipsec_server_cert" />
126                </LinearLayout>
127
128                <CheckBox style="@style/vpn_value"
129                        android:id="@+id/show_options"
130                        android:text="@string/vpn_show_options"/>
131            </LinearLayout>
132
133            <LinearLayout android:id="@+id/options"
134                    android:layout_width="match_parent"
135                    android:layout_height="wrap_content"
136                    android:orientation="vertical"
137                    android:visibility="gone">
138
139                <TextView android:id="@+id/vpn_proxy_settings_title"
140                          style="@style/vpn_label"
141                          android:text="@string/proxy_settings_title"
142                          android:labelFor="@+id/vpn_proxy_settings" />
143
144                <Spinner android:id="@+id/vpn_proxy_settings"
145                         style="@style/vpn_value"
146                         android:prompt="@string/proxy_settings_title"
147                         android:entries="@array/vpn_proxy_settings" />
148
149                <LinearLayout
150                    android:id="@+id/vpn_proxy_fields"
151                    android:layout_width="match_parent"
152                    android:layout_height="wrap_content"
153                    android:orientation="vertical"
154                    android:visibility="gone" >
155
156                    <TextView
157                        style="@style/vpn_label"
158                        android:text="@string/proxy_hostname_label"
159                        android:labelFor="@+id/vpn_proxy_host" />
160
161                    <EditText
162                        android:id="@+id/vpn_proxy_host"
163                        style="@style/vpn_value"
164                        android:hint="@string/proxy_hostname_hint"
165                        android:inputType="textNoSuggestions" />
166
167                    <TextView
168                        style="@style/vpn_label"
169                        android:text="@string/proxy_port_label"
170                        android:labelFor="@+id/vpn_proxy_port" />
171
172                    <EditText
173                        android:id="@+id/vpn_proxy_port"
174                        style="@style/vpn_value"
175                        android:hint="@string/proxy_port_hint"
176                        android:inputType="number" />
177                </LinearLayout>
178            </LinearLayout>
179
180            <LinearLayout android:id="@+id/userpass"
181                    android:layout_width="match_parent"
182                    android:layout_height="wrap_content"
183                    android:orientation="vertical">
184
185                <TextView style="@style/vpn_label"
186                        android:text="@string/vpn_username"
187                        android:labelFor="@+id/username"/>
188                <EditText style="@style/vpn_value"
189                        android:id="@+id/username"/>
190
191                <TextView style="@style/vpn_label"
192                        android:text="@string/vpn_password"
193                        android:labelFor="@+id/password"/>
194                <EditText style="@style/vpn_value"
195                        android:id="@+id/password"
196                        android:password="true"/>
197
198                <CheckBox style="@style/vpn_value"
199                        android:id="@+id/save_login"
200                        android:text="@string/vpn_save_login"/>
201            </LinearLayout>
202
203            <LinearLayout android:id="@+id/connect"
204                    android:layout_width="match_parent"
205                    android:layout_height="wrap_content"
206                    android:orientation="vertical"
207                    android:animateLayoutChanges="true">
208                <CheckBox style="@style/vpn_value"
209                        android:id="@+id/always_on_vpn"
210                        android:text="@string/vpn_menu_lockdown"/>
211                <TextView style="@style/vpn_warning"
212                        android:id="@+id/always_on_invalid_reason"
213                        android:visibility="gone"/>
214            </LinearLayout>
215        </LinearLayout>
216    </ScrollView>
217</LinearLayout>
218