]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/domain_settings.xml
Create a dark theme for `SettingsActivity`.
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / domain_settings.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2017 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
7
8   Privacy Browser is free software: you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation, either version 3 of the License, or
11   (at your option) any later version.
12
13   Privacy Browser is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18   You should have received a copy of the GNU General Public License
19   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
20
21 <ScrollView
22     xmlns:android="http://schemas.android.com/apk/res/android"
23     xmlns:tools="http://schemas.android.com/tools"
24     android:layout_height="wrap_content"
25     android:layout_width="match_parent"
26     android:focusable="true"
27     android:focusableInTouchMode="true"
28     android:descendantFocusability="beforeDescendants" >
29
30     <LinearLayout
31         xmlns:android="http://schemas.android.com/apk/res/android"
32         android:layout_height="wrap_content"
33         android:layout_width="match_parent"
34         android:layout_margin="12dp"
35         android:orientation="vertical"
36         android:divider="?android:attr/dividerVertical"
37         android:showDividers="middle" >
38
39         <!-- Domain name. -->
40         <LinearLayout
41             android:layout_height="wrap_content"
42             android:layout_width="match_parent"
43             android:orientation="vertical" >
44
45             <LinearLayout
46                 android:layout_height="wrap_content"
47                 android:layout_width="match_parent"
48                 android:orientation="horizontal" >
49
50                 <ImageView
51                     android:layout_height="wrap_content"
52                     android:layout_width="wrap_content"
53                     android:layout_marginEnd="10dp"
54                     android:layout_marginBottom="12dp"
55                     android:layout_gravity="bottom"
56                     android:src="@drawable/domains"
57                     android:tint="@color/blue_800"
58                     tools:ignore="contentDescription" />
59
60                 <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
61                 <android.support.design.widget.TextInputLayout
62                     android:layout_height="wrap_content"
63                     android:layout_width="match_parent"
64                     android:layout_marginStart="6dp" >
65
66                     <!-- `android:inputType="textUri"` disables spell check in the `EditText`. -->
67                     <android.support.design.widget.TextInputEditText
68                         android:id="@+id/domain_settings_name_edittext"
69                         android:layout_width="match_parent"
70                         android:layout_height="wrap_content"
71                         android:hint="@string/domain_name"
72                         android:inputType="textUri" />
73                 </android.support.design.widget.TextInputLayout>
74             </LinearLayout>
75
76             <TextView
77                 android:layout_height="wrap_content"
78                 android:layout_width="match_parent"
79                 android:text="@string/domain_name_instructions"
80                 android:textSize="12sp"
81                 android:layout_marginStart="43dp"
82                 android:layout_marginBottom="14dp" />
83         </LinearLayout>
84
85         <!-- JavaScript. -->
86         <LinearLayout
87             android:layout_height="wrap_content"
88             android:layout_width="match_parent"
89             android:orientation="horizontal" >
90
91             <ImageView
92                 android:id="@+id/domain_settings_javascript_imageview"
93                 android:layout_height="wrap_content"
94                 android:layout_width="wrap_content"
95                 android:layout_marginEnd="10dp"
96                 android:layout_gravity="center_vertical"
97                 tools:ignore="contentDescription" />
98
99             <Switch
100                 android:id="@+id/domain_settings_javascript_switch"
101                 android:layout_height="wrap_content"
102                 android:layout_width="match_parent"
103                 android:layout_marginStart="8dp"
104                 android:layout_marginTop="14dp"
105                 android:layout_marginBottom="14dp"
106                 android:text="@string/javascript_enabled"
107                 android:textSize="18sp" />
108         </LinearLayout>
109
110         <!-- First-Party Cookies. -->
111         <LinearLayout
112             android:layout_height="wrap_content"
113             android:layout_width="match_parent"
114             android:orientation="horizontal" >
115
116             <ImageView
117                 android:id="@+id/domain_settings_first_party_cookies_imageview"
118                 android:layout_height="wrap_content"
119                 android:layout_width="wrap_content"
120                 android:layout_marginTop="1dp"
121                 android:layout_marginEnd="10dp"
122                 android:layout_gravity="center_vertical"
123                 tools:ignore="contentDescription" />
124
125             <Switch
126                 android:id="@+id/domain_settings_first_party_cookies_switch"
127                 android:layout_height="wrap_content"
128                 android:layout_width="match_parent"
129                 android:layout_marginStart="8dp"
130                 android:layout_marginTop="14dp"
131                 android:layout_marginBottom="14dp"
132                 android:text="@string/first_party_cookies_enabled"
133                 android:textSize="18sp" />
134         </LinearLayout>
135
136         <!-- Third-Party Cookies. -->
137         <LinearLayout
138             android:id="@+id/domain_settings_third_party_cookies_linearlayout"
139             android:layout_height="wrap_content"
140             android:layout_width="match_parent"
141             android:orientation="horizontal" >
142
143             <ImageView
144                 android:id="@+id/domain_settings_third_party_cookies_imageview"
145                 android:layout_height="wrap_content"
146                 android:layout_width="wrap_content"
147                 android:layout_marginTop="1dp"
148                 android:layout_marginEnd="10dp"
149                 android:layout_gravity="center_vertical"
150                 tools:ignore="contentDescription" />
151
152             <Switch
153                 android:id="@+id/domain_settings_third_party_cookies_switch"
154                 android:layout_height="wrap_content"
155                 android:layout_width="match_parent"
156                 android:layout_marginStart="8dp"
157                 android:layout_marginTop="14dp"
158                 android:layout_marginBottom="14dp"
159                 android:text="@string/third_party_cookies_enabled"
160                 android:textSize="18sp" />
161         </LinearLayout>
162
163         <!-- DOM Storage. -->
164         <LinearLayout
165             android:layout_height="wrap_content"
166             android:layout_width="match_parent"
167             android:orientation="horizontal" >
168
169             <ImageView
170                 android:id="@+id/domain_settings_dom_storage_imageview"
171                 android:layout_height="wrap_content"
172                 android:layout_width="wrap_content"
173                 android:layout_marginTop="1dp"
174                 android:layout_marginEnd="10dp"
175                 android:layout_gravity="center_vertical"
176                 tools:ignore="contentDescription" />
177
178             <Switch
179                 android:id="@+id/domain_settings_dom_storage_switch"
180                 android:layout_height="wrap_content"
181                 android:layout_width="match_parent"
182                 android:layout_marginStart="8dp"
183                 android:layout_marginTop="14dp"
184                 android:layout_marginBottom="14dp"
185                 android:text="@string/dom_storage_enabled"
186                 android:textSize="18sp" />
187         </LinearLayout>
188
189         <!-- Form Data. -->
190         <LinearLayout
191             android:layout_height="wrap_content"
192             android:layout_width="match_parent"
193             android:orientation="horizontal" >
194
195             <ImageView
196                 android:id="@+id/domain_settings_form_data_imageview"
197                 android:layout_height="wrap_content"
198                 android:layout_width="wrap_content"
199                 android:layout_marginTop="1dp"
200                 android:layout_marginEnd="10dp"
201                 android:layout_gravity="center_vertical"
202                 tools:ignore="contentDescription" />
203
204             <Switch
205                 android:id="@+id/domain_settings_form_data_switch"
206                 android:layout_height="wrap_content"
207                 android:layout_width="match_parent"
208                 android:layout_marginStart="8dp"
209                 android:layout_marginTop="14dp"
210                 android:layout_marginBottom="14dp"
211                 android:text="@string/form_data_enabled"
212                 android:textSize="18sp" />
213         </LinearLayout>
214
215         <!-- User Agent. -->
216         <LinearLayout
217             android:layout_height="wrap_content"
218             android:layout_width="match_parent"
219             android:orientation="vertical"
220             android:layout_marginTop="14dp"
221             android:layout_marginBottom="14dp" >
222
223             <LinearLayout
224                 android:layout_height="wrap_content"
225                 android:layout_width="match_parent"
226                 android:orientation="horizontal" >
227
228                 <ImageView
229                     android:layout_height="wrap_content"
230                     android:layout_width="wrap_content"
231                     android:layout_marginTop="1dp"
232                     android:layout_marginEnd="10dp"
233                     android:layout_gravity="center_vertical"
234                     android:src="@drawable/user_agent_light"
235                     android:contentDescription="@string/user_agent" />
236
237                 <Spinner
238                     android:id="@+id/domain_settings_user_agent_spinner"
239                     android:layout_height="wrap_content"
240                     android:layout_width="match_parent"
241                     android:labelFor="@+id/domain_settings_custom_user_agent_edittext" />
242             </LinearLayout>
243
244             <TextView
245                 android:id="@+id/domain_settings_user_agent_textview"
246                 android:layout_height="match_parent"
247                 android:layout_width="match_parent"
248                 android:layout_marginStart="43dp"
249                 android:layout_marginEnd="36dp"
250                 android:textSize="13sp" />
251
252             <EditText
253                 android:id="@id/domain_settings_custom_user_agent_edittext"
254                 android:layout_height="wrap_content"
255                 android:layout_width="match_parent"
256                 android:layout_marginStart="38dp"
257                 android:layout_marginEnd="60dp"
258                 android:inputType="textUri" />
259         </LinearLayout>
260
261         <!-- Font Size. -->
262         <LinearLayout
263             android:layout_height="wrap_content"
264             android:layout_width="match_parent"
265             android:orientation="horizontal" >
266
267             <ImageView
268                 android:layout_height="wrap_content"
269                 android:layout_width="wrap_content"
270                 android:layout_marginTop="1dp"
271                 android:layout_marginEnd="10dp"
272                 android:layout_gravity="center_vertical"
273                 android:src="@drawable/font_size_light"
274                 android:contentDescription="@string/font_size" />
275
276             <Spinner
277                 android:id="@+id/domain_settings_font_size_spinner"
278                 android:layout_height="wrap_content"
279                 android:layout_width="match_parent"
280                 android:layout_marginTop="14dp"
281                 android:layout_marginBottom="14dp" />
282         </LinearLayout>
283
284         <!-- Display Images. -->
285         <LinearLayout
286             android:layout_height="wrap_content"
287             android:layout_width="match_parent"
288             android:orientation="horizontal" >
289
290             <ImageView
291                 android:id="@+id/domain_settings_display_webpage_images_imageview"
292                 android:layout_height="wrap_content"
293                 android:layout_width="wrap_content"
294                 android:layout_marginTop="1dp"
295                 android:layout_marginEnd="10dp"
296                 android:layout_gravity="center_vertical"
297                 android:contentDescription="@string/display_webpage_images" />
298
299             <Spinner
300                 android:id="@+id/domain_settings_display_webpage_images_spinner"
301                 android:layout_height="wrap_content"
302                 android:layout_width="match_parent"
303                 android:layout_marginTop="14dp"
304                 android:layout_marginBottom="14dp" />
305         </LinearLayout>
306     </LinearLayout>
307 </ScrollView>