1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2017-2018 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="horizontal" >
228 android:id="@+id/domain_settings_easylist_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 tools:ignore="contentDescription" />
237 android:id="@+id/domain_settings_easylist_switch"
238 android:layout_height="wrap_content"
239 android:layout_width="match_parent"
240 android:layout_marginStart="8dp"
241 android:layout_marginTop="14dp"
242 android:layout_marginBottom="14dp"
243 android:text="@string/easylist"
244 android:textColor="?android:textColorPrimary"
245 android:textSize="18sp" />
248 <!-- EasyPrivacy. -->
250 android:layout_height="wrap_content"
251 android:layout_width="match_parent"
252 android:orientation="horizontal" >
255 android:id="@+id/domain_settings_easyprivacy_imageview"
256 android:layout_height="wrap_content"
257 android:layout_width="wrap_content"
258 android:layout_marginTop="1dp"
259 android:layout_marginEnd="10dp"
260 android:layout_gravity="center_vertical"
261 tools:ignore="contentDescription" />
264 android:id="@+id/domain_settings_easyprivacy_switch"
265 android:layout_height="wrap_content"
266 android:layout_width="match_parent"
267 android:layout_marginStart="8dp"
268 android:layout_marginTop="14dp"
269 android:layout_marginBottom="14dp"
270 android:text="@string/easyprivacy"
271 android:textColor="?android:textColorPrimary"
272 android:textSize="18sp" />
275 <!-- Fanboy's Annoyance List. -->
277 android:layout_height="wrap_content"
278 android:layout_width="match_parent"
279 android:orientation="horizontal" >
282 android:id="@+id/domain_settings_fanboys_annoyance_list_imageview"
283 android:layout_height="wrap_content"
284 android:layout_width="wrap_content"
285 android:layout_marginTop="1dp"
286 android:layout_marginEnd="10dp"
287 android:layout_gravity="center_vertical"
288 tools:ignore="contentDescription" />
291 android:id="@+id/domain_settings_fanboys_annoyance_list_switch"
292 android:layout_height="wrap_content"
293 android:layout_width="match_parent"
294 android:layout_marginStart="8dp"
295 android:layout_marginTop="14dp"
296 android:layout_marginBottom="14dp"
297 android:text="@string/fanboys_annoyance_list"
298 android:textColor="?android:textColorPrimary"
299 android:textSize="18sp" />
302 <!-- Fanboy's Social Blocking List. -->
304 android:layout_height="wrap_content"
305 android:layout_width="match_parent"
306 android:orientation="horizontal" >
309 android:id="@+id/domain_settings_fanboys_social_blocking_list_imageview"
310 android:layout_height="wrap_content"
311 android:layout_width="wrap_content"
312 android:layout_marginTop="1dp"
313 android:layout_marginEnd="10dp"
314 android:layout_gravity="center_vertical"
315 tools:ignore="contentDescription" />
318 android:id="@+id/domain_settings_fanboys_social_blocking_list_switch"
319 android:layout_height="wrap_content"
320 android:layout_width="match_parent"
321 android:layout_marginStart="8dp"
322 android:layout_marginTop="14dp"
323 android:layout_marginBottom="14dp"
324 android:text="@string/fanboys_social_blocking_list"
325 android:textColor="?android:textColorPrimary"
326 android:textSize="18sp" />
329 <!-- Block All Third Party Requests. -->
331 android:layout_height="wrap_content"
332 android:layout_width="match_parent"
333 android:orientation="horizontal" >
336 android:id="@+id/domain_settings_block_all_third_party_requests_imageview"
337 android:layout_height="wrap_content"
338 android:layout_width="wrap_content"
339 android:layout_marginTop="1dp"
340 android:layout_marginEnd="10dp"
341 android:layout_gravity="center_vertical"
342 tools:ignore="contentDescription" />
345 android:id="@+id/domain_settings_block_all_third_party_requests_switch"
346 android:layout_height="wrap_content"
347 android:layout_width="match_parent"
348 android:layout_marginStart="8dp"
349 android:layout_marginTop="14dp"
350 android:layout_marginBottom="14dp"
351 android:text="@string/block_all_third_party_requests"
352 android:textColor="?android:textColorPrimary"
353 android:textSize="18sp" />
358 android:layout_height="wrap_content"
359 android:layout_width="match_parent"
360 android:orientation="vertical"
361 android:layout_marginTop="14dp"
362 android:layout_marginBottom="14dp" >
365 android:layout_height="wrap_content"
366 android:layout_width="match_parent"
367 android:orientation="horizontal" >
370 android:layout_height="wrap_content"
371 android:layout_width="wrap_content"
372 android:layout_marginTop="1dp"
373 android:layout_marginEnd="10dp"
374 android:layout_gravity="center_vertical"
375 android:src="@drawable/user_agent_light"
376 android:tint="?attr/domainSettingsIconTintColor"
377 android:contentDescription="@string/user_agent" />
380 android:id="@+id/domain_settings_user_agent_spinner"
381 android:layout_height="wrap_content"
382 android:layout_width="match_parent"
383 android:labelFor="@+id/domain_settings_custom_user_agent_edittext" />
387 android:id="@+id/domain_settings_user_agent_textview"
388 android:layout_height="match_parent"
389 android:layout_width="match_parent"
390 android:layout_marginStart="45dp"
391 android:layout_marginEnd="36dp"
392 android:textSize="13sp" />
395 android:id="@id/domain_settings_custom_user_agent_edittext"
396 android:layout_height="wrap_content"
397 android:layout_width="match_parent"
398 android:layout_marginStart="40dp"
399 android:layout_marginEnd="60dp"
400 android:inputType="textUri"
401 android:hint="@string/custom_user_agent"/>
406 android:layout_height="wrap_content"
407 android:layout_width="match_parent"
408 android:orientation="vertical"
409 android:layout_marginTop="14dp"
410 android:layout_marginBottom="14dp" >
413 android:layout_height="wrap_content"
414 android:layout_width="match_parent"
415 android:orientation="horizontal" >
418 android:layout_height="wrap_content"
419 android:layout_width="wrap_content"
420 android:layout_marginTop="1dp"
421 android:layout_marginEnd="10dp"
422 android:layout_gravity="center_vertical"
423 android:src="@drawable/font_size_light"
424 android:tint="?attr/domainSettingsIconTintColor"
425 android:contentDescription="@string/font_size" />
428 android:id="@+id/domain_settings_font_size_spinner"
429 android:layout_height="wrap_content"
430 android:layout_width="match_parent" />
434 android:id="@+id/domain_settings_font_size_textview"
435 android:layout_height="match_parent"
436 android:layout_width="match_parent"
437 android:layout_marginStart="45dp"
438 android:layout_marginEnd="36dp"
439 android:textSize="13sp" />
443 <!-- Swipe to Refresh. -->
445 android:layout_height="wrap_content"
446 android:layout_width="match_parent"
447 android:orientation="vertical"
448 android:layout_marginTop="14dp"
449 android:layout_marginBottom="14dp" >
452 android:layout_height="wrap_content"
453 android:layout_width="match_parent"
454 android:orientation="horizontal" >
457 android:id="@+id/domain_settings_swipe_to_refresh_imageview"
458 android:layout_height="wrap_content"
459 android:layout_width="wrap_content"
460 android:layout_marginTop="1dp"
461 android:layout_marginEnd="10dp"
462 android:layout_gravity="center_vertical"
463 android:contentDescription="@string/swipe_to_refresh_preference" />
466 android:id="@+id/domain_settings_swipe_to_refresh_spinner"
467 android:layout_height="wrap_content"
468 android:layout_width="match_parent" />
472 android:id="@+id/domain_settings_swipe_to_refresh_textview"
473 android:layout_height="match_parent"
474 android:layout_width="match_parent"
475 android:layout_marginStart="45dp"
476 android:layout_marginEnd="36dp"
477 android:textSize="13sp" />
482 android:layout_height="wrap_content"
483 android:layout_width="match_parent"
484 android:orientation="vertical"
485 android:layout_marginTop="14dp"
486 android:layout_marginBottom="14dp" >
489 android:layout_height="wrap_content"
490 android:layout_width="match_parent"
491 android:orientation="horizontal" >
494 android:id="@+id/domain_settings_night_mode_imageview"
495 android:layout_height="wrap_content"
496 android:layout_width="wrap_content"
497 android:layout_marginTop="1dp"
498 android:layout_marginEnd="10dp"
499 android:layout_gravity="center_vertical"
500 android:contentDescription="@string/night_mode" />
503 android:id="@+id/domain_settings_night_mode_spinner"
504 android:layout_height="wrap_content"
505 android:layout_width="match_parent" />
509 android:id="@+id/domain_settings_night_mode_textview"
510 android:layout_height="match_parent"
511 android:layout_width="match_parent"
512 android:layout_marginStart="45dp"
513 android:layout_marginEnd="36dp"
514 android:textSize="13sp" />
517 <!-- Display Images. -->
519 android:layout_height="wrap_content"
520 android:layout_width="match_parent"
521 android:orientation="vertical"
522 android:layout_marginTop="14dp"
523 android:layout_marginBottom="14dp" >
526 android:layout_height="wrap_content"
527 android:layout_width="match_parent"
528 android:orientation="horizontal" >
531 android:id="@+id/domain_settings_display_webpage_images_imageview"
532 android:layout_height="wrap_content"
533 android:layout_width="wrap_content"
534 android:layout_marginTop="1dp"
535 android:layout_marginEnd="10dp"
536 android:layout_gravity="center_vertical"
537 android:contentDescription="@string/display_webpage_images" />
540 android:id="@+id/domain_settings_display_webpage_images_spinner"
541 android:layout_height="wrap_content"
542 android:layout_width="match_parent" />
546 android:id="@+id/domain_settings_display_webpage_images_textview"
547 android:layout_height="match_parent"
548 android:layout_width="match_parent"
549 android:layout_marginStart="45dp"
550 android:layout_marginEnd="36dp"
551 android:textSize="13sp" />
554 <!-- Pinned SSL Certificate -->
556 android:layout_height="wrap_content"
557 android:layout_width="match_parent"
558 android:orientation="vertical"
559 android:layout_marginTop="18dp"
560 android:layout_marginBottom="32dp" >
564 android:layout_height="wrap_content"
565 android:layout_width="match_parent"
566 android:orientation="horizontal" >
569 android:id="@+id/domain_settings_pinned_ssl_certificate_imageview"
570 android:layout_height="wrap_content"
571 android:layout_width="wrap_content"
572 android:layout_marginTop="1dp"
573 android:layout_marginEnd="10dp"
574 android:layout_gravity="center_vertical"
575 tools:ignore="contentDescription" />
578 android:id="@+id/domain_settings_pinned_ssl_certificate_switch"
579 android:layout_height="wrap_content"
580 android:layout_width="match_parent"
581 android:layout_marginStart="8dp"
582 android:text="@string/pinned_ssl_certificate"
583 android:textColor="?android:textColorPrimary"
584 android:textSize="18sp" />
587 <!-- Saved Certificate -->
589 android:id="@+id/saved_ssl_certificate_linearlayout"
590 android:layout_height="wrap_content"
591 android:layout_width="match_parent"
592 android:orientation="vertical"
593 android:layout_marginTop="20dp"
594 android:layout_marginBottom="12dp"
595 android:layout_marginStart="10dp"
596 android:layout_marginEnd="10dp" >
599 android:id="@+id/saved_ssl_certificate_radiobutton"
600 android:layout_height="wrap_content"
601 android:layout_width="match_parent"
602 android:text="@string/saved_ssl_certificate"
603 android:textSize="17sp"
604 android:textAllCaps="true"
605 android:textStyle="bold" />
608 android:layout_height="wrap_content"
609 android:layout_width="match_parent"
610 android:layout_marginStart="32dp"
611 android:orientation="vertical" >
613 <!-- Saved Certificate Issued To. -->
615 android:layout_height="wrap_content"
616 android:layout_width="match_parent"
617 android:text="@string/issued_to"
618 android:textAllCaps="true"
619 android:textStyle="bold"
620 android:textColor="?attr/sslTitle" />
623 android:id="@+id/saved_ssl_certificate_issued_to_cname"
624 android:layout_height="wrap_content"
625 android:layout_width="match_parent" />
628 android:id="@+id/saved_ssl_certificate_issued_to_oname"
629 android:layout_height="wrap_content"
630 android:layout_width="match_parent" />
633 android:id="@+id/saved_ssl_certificate_issued_to_uname"
634 android:layout_height="wrap_content"
635 android:layout_width="match_parent"/>
637 <!-- Saved Certificate Issued By. -->
639 android:layout_height="wrap_content"
640 android:layout_width="match_parent"
641 android:layout_marginTop="15dp"
642 android:text="@string/issued_by"
643 android:textAllCaps="true"
644 android:textStyle="bold"
645 android:textColor="?attr/sslTitle"/>
648 android:id="@+id/saved_ssl_certificate_issued_by_cname"
650 android:layout_height="wrap_content"
651 android:layout_width="match_parent" />
654 android:id="@+id/saved_ssl_certificate_issued_by_oname"
655 android:layout_height="wrap_content"
656 android:layout_width="match_parent" />
659 android:id="@+id/saved_ssl_certificate_issued_by_uname"
660 android:layout_height="wrap_content"
661 android:layout_width="match_parent" />
663 <!-- Saved Certificate Valid Dates. -->
665 android:layout_height="wrap_content"
666 android:layout_width="match_parent"
667 android:layout_marginTop="15dp"
668 android:text="@string/valid_dates"
669 android:textAllCaps="true"
670 android:textStyle="bold"
671 android:textColor="?attr/sslTitle"/>
674 android:id="@+id/saved_ssl_certificate_start_date"
675 android:layout_height="wrap_content"
676 android:layout_width="match_parent" />
679 android:id="@+id/saved_ssl_certificate_end_date"
680 android:layout_height="wrap_content"
681 android:layout_width="match_parent" />
685 <!-- Current Website Certificate -->
687 android:id="@+id/current_website_certificate_linearlayout"
688 android:layout_height="wrap_content"
689 android:layout_width="match_parent"
690 android:orientation="vertical"
691 android:layout_marginTop="20dp"
692 android:layout_marginBottom="8dp"
693 android:layout_marginStart="10dp"
694 android:layout_marginEnd="10dp" >
697 android:id="@+id/current_website_certificate_radiobutton"
698 android:layout_height="wrap_content"
699 android:layout_width="match_parent"
700 android:text="@string/current_website_ssl_certificate"
701 android:textSize="17sp"
702 android:textAllCaps="true"
703 android:textStyle="bold" />
706 android:layout_height="wrap_content"
707 android:layout_width="match_parent"
708 android:layout_marginStart="32dp"
709 android:orientation="vertical" >
711 <!-- Current Website Certificate Issued To. -->
713 android:layout_height="wrap_content"
714 android:layout_width="match_parent"
715 android:text="@string/issued_to"
716 android:textAllCaps="true"
717 android:textStyle="bold"
718 android:textColor="?attr/sslTitle" />
721 android:id="@+id/current_website_certificate_issued_to_cname"
722 android:layout_height="wrap_content"
723 android:layout_width="match_parent" />
726 android:id="@+id/current_website_certificate_issued_to_oname"
727 android:layout_height="wrap_content"
728 android:layout_width="match_parent" />
731 android:id="@+id/current_website_certificate_issued_to_uname"
732 android:layout_height="wrap_content"
733 android:layout_width="match_parent" />
735 <!-- Current Website Certificate Issued By. -->
737 android:layout_height="wrap_content"
738 android:layout_width="match_parent"
739 android:layout_marginTop="15dp"
740 android:text="@string/issued_by"
741 android:textAllCaps="true"
742 android:textStyle="bold"
743 android:textColor="?attr/sslTitle" />
746 android:id="@+id/current_website_certificate_issued_by_cname"
747 android:layout_height="wrap_content"
748 android:layout_width="match_parent" />
751 android:id="@+id/current_website_certificate_issued_by_oname"
752 android:layout_height="wrap_content"
753 android:layout_width="match_parent" />
756 android:id="@+id/current_website_certificate_issued_by_uname"
757 android:layout_height="wrap_content"
758 android:layout_width="match_parent" />
760 <!-- Current Website Certificate Valid Dates. -->
762 android:layout_height="wrap_content"
763 android:layout_width="match_parent"
764 android:layout_marginTop="15dp"
765 android:text="@string/valid_dates"
766 android:textAllCaps="true"
767 android:textStyle="bold"
768 android:textColor="?attr/sslTitle" />
771 android:id="@+id/current_website_certificate_start_date"
772 android:layout_height="wrap_content"
773 android:layout_width="match_parent" />
776 android:id="@+id/current_website_certificate_end_date"
777 android:layout_height="wrap_content"
778 android:layout_width="match_parent" />
782 <!-- Load An Encrypted Website Instructions. -->
784 android:id="@+id/no_current_website_certificate"
785 android:layout_height="wrap_content"
786 android:layout_width="match_parent"
787 android:layout_marginTop="10dp"
788 android:layout_marginStart="40dp"
789 android:layout_marginEnd="40dp"
790 android:gravity="center_horizontal"
791 android:text="@string/load_an_encrypted_website" />