1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2017 Soren Stoutner <soren@stoutner.com>.
6 This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
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.
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.
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/>. -->
22 android:id="@+id/domain_settings_scrollview"
23 xmlns:android="http://schemas.android.com/apk/res/android"
24 xmlns:tools="http://schemas.android.com/tools"
25 android:layout_height="wrap_content"
26 android:layout_width="match_parent"
27 android:focusable="true"
28 android:focusableInTouchMode="true"
29 android:descendantFocusability="beforeDescendants" >
32 xmlns:android="http://schemas.android.com/apk/res/android"
33 android:layout_height="wrap_content"
34 android:layout_width="match_parent"
35 android:layout_margin="12dp"
36 android:orientation="vertical"
37 android:divider="?android:attr/dividerVertical" >
41 android:layout_height="wrap_content"
42 android:layout_width="match_parent"
43 android:orientation="vertical" >
46 android:layout_height="wrap_content"
47 android:layout_width="match_parent"
48 android:orientation="horizontal" >
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="?attr/domainSettingsIconTintColor"
58 tools:ignore="contentDescription" />
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" >
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>
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" />
87 android:layout_height="wrap_content"
88 android:layout_width="match_parent"
89 android:orientation="horizontal" >
92 android:id="@+id/domain_settings_javascript_imageview"
93 android:layout_height="wrap_content"
94 android:layout_width="wrap_content"
95 android:layout_marginTop="1dp"
96 android:layout_marginEnd="10dp"
97 android:layout_gravity="center_vertical"
98 tools:ignore="contentDescription" />
101 android:id="@+id/domain_settings_javascript_switch"
102 android:layout_height="wrap_content"
103 android:layout_width="match_parent"
104 android:layout_marginStart="8dp"
105 android:layout_marginTop="14dp"
106 android:layout_marginBottom="14dp"
107 android:text="@string/javascript_enabled"
108 android:textColor="?android:textColorPrimary"
109 android:textSize="18sp" />
112 <!-- First-Party Cookies. -->
114 android:layout_height="wrap_content"
115 android:layout_width="match_parent"
116 android:orientation="horizontal" >
119 android:id="@+id/domain_settings_first_party_cookies_imageview"
120 android:layout_height="wrap_content"
121 android:layout_width="wrap_content"
122 android:layout_marginTop="1dp"
123 android:layout_marginEnd="10dp"
124 android:layout_gravity="center_vertical"
125 tools:ignore="contentDescription" />
128 android:id="@+id/domain_settings_first_party_cookies_switch"
129 android:layout_height="wrap_content"
130 android:layout_width="match_parent"
131 android:layout_marginStart="8dp"
132 android:layout_marginTop="14dp"
133 android:layout_marginBottom="14dp"
134 android:text="@string/first_party_cookies_enabled"
135 android:textColor="?android:textColorPrimary"
136 android:textSize="18sp" />
139 <!-- Third-Party Cookies. -->
141 android:id="@+id/domain_settings_third_party_cookies_linearlayout"
142 android:layout_height="wrap_content"
143 android:layout_width="match_parent"
144 android:orientation="horizontal" >
147 android:id="@+id/domain_settings_third_party_cookies_imageview"
148 android:layout_height="wrap_content"
149 android:layout_width="wrap_content"
150 android:layout_marginTop="1dp"
151 android:layout_marginEnd="10dp"
152 android:layout_gravity="center_vertical"
153 tools:ignore="contentDescription" />
156 android:id="@+id/domain_settings_third_party_cookies_switch"
157 android:layout_height="wrap_content"
158 android:layout_width="match_parent"
159 android:layout_marginStart="8dp"
160 android:layout_marginTop="14dp"
161 android:layout_marginBottom="14dp"
162 android:text="@string/third_party_cookies_enabled"
163 android:textColor="?android:textColorPrimary"
164 android:textSize="18sp" />
167 <!-- DOM Storage. -->
169 android:layout_height="wrap_content"
170 android:layout_width="match_parent"
171 android:orientation="horizontal" >
174 android:id="@+id/domain_settings_dom_storage_imageview"
175 android:layout_height="wrap_content"
176 android:layout_width="wrap_content"
177 android:layout_marginTop="1dp"
178 android:layout_marginEnd="10dp"
179 android:layout_gravity="center_vertical"
180 tools:ignore="contentDescription" />
183 android:id="@+id/domain_settings_dom_storage_switch"
184 android:layout_height="wrap_content"
185 android:layout_width="match_parent"
186 android:layout_marginStart="8dp"
187 android:layout_marginTop="14dp"
188 android:layout_marginBottom="14dp"
189 android:text="@string/dom_storage_enabled"
190 android:textColor="?android:textColorPrimary"
191 android:textSize="18sp" />
196 android:layout_height="wrap_content"
197 android:layout_width="match_parent"
198 android:orientation="horizontal" >
201 android:id="@+id/domain_settings_form_data_imageview"
202 android:layout_height="wrap_content"
203 android:layout_width="wrap_content"
204 android:layout_marginTop="1dp"
205 android:layout_marginEnd="10dp"
206 android:layout_gravity="center_vertical"
207 tools:ignore="contentDescription" />
210 android:id="@+id/domain_settings_form_data_switch"
211 android:layout_height="wrap_content"
212 android:layout_width="match_parent"
213 android:layout_marginStart="8dp"
214 android:layout_marginTop="14dp"
215 android:layout_marginBottom="14dp"
216 android:text="@string/form_data_enabled"
217 android:textColor="?android:textColorPrimary"
218 android:textSize="18sp" />
223 android:layout_height="wrap_content"
224 android:layout_width="match_parent"
225 android:orientation="vertical"
226 android:layout_marginTop="14dp"
227 android:layout_marginBottom="14dp" >
230 android:layout_height="wrap_content"
231 android:layout_width="match_parent"
232 android:orientation="horizontal" >
235 android:layout_height="wrap_content"
236 android:layout_width="wrap_content"
237 android:layout_marginTop="1dp"
238 android:layout_marginEnd="10dp"
239 android:layout_gravity="center_vertical"
240 android:src="@drawable/user_agent_light"
241 android:tint="?attr/domainSettingsIconTintColor"
242 android:contentDescription="@string/user_agent" />
245 android:id="@+id/domain_settings_user_agent_spinner"
246 android:layout_height="wrap_content"
247 android:layout_width="match_parent"
248 android:labelFor="@+id/domain_settings_custom_user_agent_edittext" />
252 android:id="@+id/domain_settings_user_agent_textview"
253 android:layout_height="match_parent"
254 android:layout_width="match_parent"
255 android:layout_marginStart="45dp"
256 android:layout_marginEnd="36dp"
257 android:textSize="13sp" />
260 android:id="@id/domain_settings_custom_user_agent_edittext"
261 android:layout_height="wrap_content"
262 android:layout_width="match_parent"
263 android:layout_marginStart="40dp"
264 android:layout_marginEnd="60dp"
265 android:inputType="textUri" />
270 android:layout_height="wrap_content"
271 android:layout_width="match_parent"
272 android:orientation="vertical"
273 android:layout_marginTop="14dp"
274 android:layout_marginBottom="14dp" >
277 android:layout_height="wrap_content"
278 android:layout_width="match_parent"
279 android:orientation="horizontal" >
282 android:layout_height="wrap_content"
283 android:layout_width="wrap_content"
284 android:layout_marginTop="1dp"
285 android:layout_marginEnd="10dp"
286 android:layout_gravity="center_vertical"
287 android:src="@drawable/font_size_light"
288 android:tint="?attr/domainSettingsIconTintColor"
289 android:contentDescription="@string/font_size" />
292 android:id="@+id/domain_settings_font_size_spinner"
293 android:layout_height="wrap_content"
294 android:layout_width="match_parent" />
298 android:id="@+id/domain_settings_font_size_textview"
299 android:layout_height="match_parent"
300 android:layout_width="match_parent"
301 android:layout_marginStart="45dp"
302 android:layout_marginEnd="36dp"
303 android:textSize="13sp" />
307 <!-- Display Images. -->
309 android:layout_height="wrap_content"
310 android:layout_width="match_parent"
311 android:orientation="vertical"
312 android:layout_marginTop="14dp"
313 android:layout_marginBottom="14dp" >
316 android:layout_height="wrap_content"
317 android:layout_width="match_parent"
318 android:orientation="horizontal" >
321 android:id="@+id/domain_settings_display_webpage_images_imageview"
322 android:layout_height="wrap_content"
323 android:layout_width="wrap_content"
324 android:layout_marginTop="1dp"
325 android:layout_marginEnd="10dp"
326 android:layout_gravity="center_vertical"
327 android:contentDescription="@string/display_webpage_images" />
330 android:id="@+id/domain_settings_display_webpage_images_spinner"
331 android:layout_height="wrap_content"
332 android:layout_width="match_parent" />
336 android:id="@+id/domain_settings_display_webpage_images_textview"
337 android:layout_height="match_parent"
338 android:layout_width="match_parent"
339 android:layout_marginStart="45dp"
340 android:layout_marginEnd="36dp"
341 android:textSize="13sp" />
346 android:layout_height="wrap_content"
347 android:layout_width="match_parent"
348 android:orientation="vertical"
349 android:layout_marginTop="14dp"
350 android:layout_marginBottom="14dp" >
353 android:layout_height="wrap_content"
354 android:layout_width="match_parent"
355 android:orientation="horizontal" >
358 android:id="@+id/domain_settings_night_mode_imageview"
359 android:layout_height="wrap_content"
360 android:layout_width="wrap_content"
361 android:layout_marginTop="1dp"
362 android:layout_marginEnd="10dp"
363 android:layout_gravity="center_vertical"
364 android:contentDescription="@string/night_mode" />
367 android:id="@+id/domain_settings_night_mode_spinner"
368 android:layout_height="wrap_content"
369 android:layout_width="match_parent" />
373 android:id="@+id/domain_settings_night_mode_textview"
374 android:layout_height="match_parent"
375 android:layout_width="match_parent"
376 android:layout_marginStart="45dp"
377 android:layout_marginEnd="36dp"
378 android:textSize="13sp" />
381 <!-- Pinned SSL Certificate -->
383 android:layout_height="wrap_content"
384 android:layout_width="match_parent"
385 android:orientation="vertical"
386 android:layout_marginTop="18dp"
387 android:layout_marginBottom="32dp" >
391 android:layout_height="wrap_content"
392 android:layout_width="match_parent"
393 android:orientation="horizontal" >
396 android:id="@+id/domain_settings_pinned_ssl_certificate_imageview"
397 android:layout_height="wrap_content"
398 android:layout_width="wrap_content"
399 android:layout_marginTop="1dp"
400 android:layout_marginEnd="10dp"
401 android:layout_gravity="center_vertical"
402 tools:ignore="contentDescription" />
405 android:id="@+id/domain_settings_pinned_ssl_certificate_switch"
406 android:layout_height="wrap_content"
407 android:layout_width="match_parent"
408 android:layout_marginStart="8dp"
409 android:text="@string/pinned_ssl_certificate"
410 android:textColor="?android:textColorPrimary"
411 android:textSize="18sp" />
414 <!-- Saved Certificate -->
416 android:id="@+id/saved_ssl_certificate_linearlayout"
417 android:layout_height="wrap_content"
418 android:layout_width="match_parent"
419 android:orientation="vertical"
420 android:layout_marginTop="20dp"
421 android:layout_marginBottom="12dp"
422 android:layout_marginStart="10dp"
423 android:layout_marginEnd="10dp" >
426 android:id="@+id/saved_ssl_certificate_radiobutton"
427 android:layout_height="wrap_content"
428 android:layout_width="match_parent"
429 android:text="@string/saved_ssl_certificate"
430 android:textSize="17sp"
431 android:textAllCaps="true"
432 android:textStyle="bold" />
435 android:layout_height="wrap_content"
436 android:layout_width="match_parent"
437 android:layout_marginStart="32dp"
438 android:orientation="vertical" >
440 <!-- Saved Certificate Issued To. -->
442 android:layout_height="wrap_content"
443 android:layout_width="match_parent"
444 android:text="@string/issued_to"
445 android:textAllCaps="true"
446 android:textStyle="bold"
447 android:textColor="?attr/sslTitle" />
450 android:id="@+id/saved_ssl_certificate_issued_to_cname"
451 android:layout_height="wrap_content"
452 android:layout_width="match_parent" />
455 android:id="@+id/saved_ssl_certificate_issued_to_oname"
456 android:layout_height="wrap_content"
457 android:layout_width="match_parent" />
460 android:id="@+id/saved_ssl_certificate_issued_to_uname"
461 android:layout_height="wrap_content"
462 android:layout_width="match_parent"/>
464 <!-- Saved Certificate Issued By. -->
466 android:layout_height="wrap_content"
467 android:layout_width="match_parent"
468 android:layout_marginTop="15dp"
469 android:text="@string/issued_by"
470 android:textAllCaps="true"
471 android:textStyle="bold"
472 android:textColor="?attr/sslTitle"/>
475 android:id="@+id/saved_ssl_certificate_issued_by_cname"
477 android:layout_height="wrap_content"
478 android:layout_width="match_parent" />
481 android:id="@+id/saved_ssl_certificate_issued_by_oname"
482 android:layout_height="wrap_content"
483 android:layout_width="match_parent" />
486 android:id="@+id/saved_ssl_certificate_issued_by_uname"
487 android:layout_height="wrap_content"
488 android:layout_width="match_parent" />
490 <!-- Saved Certificate Valid Dates. -->
492 android:layout_height="wrap_content"
493 android:layout_width="match_parent"
494 android:layout_marginTop="15dp"
495 android:text="@string/valid_dates"
496 android:textAllCaps="true"
497 android:textStyle="bold"
498 android:textColor="?attr/sslTitle"/>
501 android:id="@+id/saved_ssl_certificate_start_date"
502 android:layout_height="wrap_content"
503 android:layout_width="match_parent" />
506 android:id="@+id/saved_ssl_certificate_end_date"
507 android:layout_height="wrap_content"
508 android:layout_width="match_parent" />
512 <!-- Current Website Certificate -->
514 android:id="@+id/current_website_certificate_linearlayout"
515 android:layout_height="wrap_content"
516 android:layout_width="match_parent"
517 android:orientation="vertical"
518 android:layout_marginTop="20dp"
519 android:layout_marginBottom="8dp"
520 android:layout_marginStart="10dp"
521 android:layout_marginEnd="10dp" >
524 android:id="@+id/current_website_certificate_radiobutton"
525 android:layout_height="wrap_content"
526 android:layout_width="match_parent"
527 android:text="@string/current_website_ssl_certificate"
528 android:textSize="17sp"
529 android:textAllCaps="true"
530 android:textStyle="bold" />
533 android:layout_height="wrap_content"
534 android:layout_width="match_parent"
535 android:layout_marginStart="32dp"
536 android:orientation="vertical" >
538 <!-- Current Website Certificate Issued To. -->
540 android:layout_height="wrap_content"
541 android:layout_width="match_parent"
542 android:text="@string/issued_to"
543 android:textAllCaps="true"
544 android:textStyle="bold"
545 android:textColor="?attr/sslTitle" />
548 android:id="@+id/current_website_certificate_issued_to_cname"
549 android:layout_height="wrap_content"
550 android:layout_width="match_parent" />
553 android:id="@+id/current_website_certificate_issued_to_oname"
554 android:layout_height="wrap_content"
555 android:layout_width="match_parent" />
558 android:id="@+id/current_website_certificate_issued_to_uname"
559 android:layout_height="wrap_content"
560 android:layout_width="match_parent" />
562 <!-- Current Website Certificate Issued By. -->
564 android:layout_height="wrap_content"
565 android:layout_width="match_parent"
566 android:layout_marginTop="15dp"
567 android:text="@string/issued_by"
568 android:textAllCaps="true"
569 android:textStyle="bold"
570 android:textColor="?attr/sslTitle" />
573 android:id="@+id/current_website_certificate_issued_by_cname"
574 android:layout_height="wrap_content"
575 android:layout_width="match_parent" />
578 android:id="@+id/current_website_certificate_issued_by_oname"
579 android:layout_height="wrap_content"
580 android:layout_width="match_parent" />
583 android:id="@+id/current_website_certificate_issued_by_uname"
584 android:layout_height="wrap_content"
585 android:layout_width="match_parent" />
587 <!-- Current Website Certificate Valid Dates. -->
589 android:layout_height="wrap_content"
590 android:layout_width="match_parent"
591 android:layout_marginTop="15dp"
592 android:text="@string/valid_dates"
593 android:textAllCaps="true"
594 android:textStyle="bold"
595 android:textColor="?attr/sslTitle" />
598 android:id="@+id/current_website_certificate_start_date"
599 android:layout_height="wrap_content"
600 android:layout_width="match_parent" />
603 android:id="@+id/current_website_certificate_end_date"
604 android:layout_height="wrap_content"
605 android:layout_width="match_parent" />
609 <!-- Load An Encrypted Website Instructions. -->
611 android:id="@+id/no_current_website_certificate"
612 android:layout_height="wrap_content"
613 android:layout_width="match_parent"
614 android:layout_marginTop="10dp"
615 android:layout_marginStart="40dp"
616 android:layout_marginEnd="40dp"
617 android:gravity="center_horizontal"
618 android:text="@string/load_an_encrypted_website" />