]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/domain_settings_fragment.xml
Create an adaptive icon. https://redmine.stoutner.com/issues/265
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / domain_settings_fragment.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     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" >
30
31     <LinearLayout
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" >
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="?attr/domainSettingsIconTintColor"
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_marginTop="1dp"
96                 android:layout_marginEnd="10dp"
97                 android:layout_gravity="center_vertical"
98                 tools:ignore="contentDescription" />
99
100             <Switch
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" />
110         </LinearLayout>
111
112         <!-- First-Party Cookies. -->
113         <LinearLayout
114             android:layout_height="wrap_content"
115             android:layout_width="match_parent"
116             android:orientation="horizontal" >
117
118             <ImageView
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" />
126
127             <Switch
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" />
137         </LinearLayout>
138
139         <!-- Third-Party Cookies. -->
140         <LinearLayout
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" >
145
146             <ImageView
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" />
154
155             <Switch
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" />
165         </LinearLayout>
166
167         <!-- DOM Storage. -->
168         <LinearLayout
169             android:layout_height="wrap_content"
170             android:layout_width="match_parent"
171             android:orientation="horizontal" >
172
173             <ImageView
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" />
181
182             <Switch
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" />
192         </LinearLayout>
193
194         <!-- Form Data. -->
195         <LinearLayout
196             android:layout_height="wrap_content"
197             android:layout_width="match_parent"
198             android:orientation="horizontal" >
199
200             <ImageView
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" />
208
209             <Switch
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" />
219         </LinearLayout>
220
221         <!-- User Agent. -->
222         <LinearLayout
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" >
228
229             <LinearLayout
230                 android:layout_height="wrap_content"
231                 android:layout_width="match_parent"
232                 android:orientation="horizontal" >
233
234                 <ImageView
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" />
243
244                 <Spinner
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" />
249             </LinearLayout>
250
251             <TextView
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" />
258
259             <EditText
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" />
266         </LinearLayout>
267
268         <!-- Font Size. -->
269         <LinearLayout
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" >
275
276             <LinearLayout
277                 android:layout_height="wrap_content"
278                 android:layout_width="match_parent"
279                 android:orientation="horizontal" >
280
281                 <ImageView
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" />
290
291                 <Spinner
292                     android:id="@+id/domain_settings_font_size_spinner"
293                     android:layout_height="wrap_content"
294                     android:layout_width="match_parent" />
295             </LinearLayout>
296
297             <TextView
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" />
304
305         </LinearLayout>
306
307         <!-- Display Images. -->
308         <LinearLayout
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" >
314
315             <LinearLayout
316                 android:layout_height="wrap_content"
317                 android:layout_width="match_parent"
318                 android:orientation="horizontal" >
319
320                 <ImageView
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" />
328
329                 <Spinner
330                     android:id="@+id/domain_settings_display_webpage_images_spinner"
331                     android:layout_height="wrap_content"
332                     android:layout_width="match_parent" />
333             </LinearLayout>
334
335             <TextView
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" />
342         </LinearLayout>
343
344         <!-- Night Mode. -->
345         <LinearLayout
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" >
351
352             <LinearLayout
353                 android:layout_height="wrap_content"
354                 android:layout_width="match_parent"
355                 android:orientation="horizontal" >
356
357                 <ImageView
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" />
365
366                 <Spinner
367                     android:id="@+id/domain_settings_night_mode_spinner"
368                     android:layout_height="wrap_content"
369                     android:layout_width="match_parent" />
370             </LinearLayout>
371
372             <TextView
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" />
379         </LinearLayout>
380
381         <!-- Pinned SSL Certificate -->
382         <LinearLayout
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" >
388
389             <!-- Switch -->
390             <LinearLayout
391                 android:layout_height="wrap_content"
392                 android:layout_width="match_parent"
393                 android:orientation="horizontal" >
394
395                 <ImageView
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" />
403
404                 <Switch
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" />
412             </LinearLayout>
413
414             <!-- Saved Certificate -->
415             <LinearLayout
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" >
424
425                 <RadioButton
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" />
433
434                 <LinearLayout
435                     android:layout_height="wrap_content"
436                     android:layout_width="match_parent"
437                     android:layout_marginStart="32dp"
438                     android:orientation="vertical" >
439
440                     <!-- Saved Certificate Issued To. -->
441                     <TextView
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" />
448
449                     <TextView
450                         android:id="@+id/saved_ssl_certificate_issued_to_cname"
451                         android:layout_height="wrap_content"
452                         android:layout_width="match_parent" />
453
454                     <TextView
455                         android:id="@+id/saved_ssl_certificate_issued_to_oname"
456                         android:layout_height="wrap_content"
457                         android:layout_width="match_parent" />
458
459                     <TextView
460                         android:id="@+id/saved_ssl_certificate_issued_to_uname"
461                         android:layout_height="wrap_content"
462                         android:layout_width="match_parent"/>
463
464                     <!-- Saved Certificate Issued By. -->
465                     <TextView
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"/>
473
474                     <TextView
475                         android:id="@+id/saved_ssl_certificate_issued_by_cname"
476
477                         android:layout_height="wrap_content"
478                         android:layout_width="match_parent" />
479
480                     <TextView
481                         android:id="@+id/saved_ssl_certificate_issued_by_oname"
482                         android:layout_height="wrap_content"
483                         android:layout_width="match_parent" />
484
485                     <TextView
486                         android:id="@+id/saved_ssl_certificate_issued_by_uname"
487                         android:layout_height="wrap_content"
488                         android:layout_width="match_parent" />
489
490                     <!-- Saved Certificate Valid Dates. -->
491                     <TextView
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"/>
499
500                     <TextView
501                         android:id="@+id/saved_ssl_certificate_start_date"
502                         android:layout_height="wrap_content"
503                         android:layout_width="match_parent" />
504
505                     <TextView
506                         android:id="@+id/saved_ssl_certificate_end_date"
507                         android:layout_height="wrap_content"
508                         android:layout_width="match_parent" />
509                 </LinearLayout>
510             </LinearLayout>
511
512             <!-- Current Website Certificate -->
513             <LinearLayout
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" >
522
523                 <RadioButton
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" />
531
532                 <LinearLayout
533                     android:layout_height="wrap_content"
534                     android:layout_width="match_parent"
535                     android:layout_marginStart="32dp"
536                     android:orientation="vertical" >
537
538                     <!-- Current Website Certificate Issued To. -->
539                     <TextView
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" />
546
547                     <TextView
548                         android:id="@+id/current_website_certificate_issued_to_cname"
549                         android:layout_height="wrap_content"
550                         android:layout_width="match_parent" />
551
552                     <TextView
553                         android:id="@+id/current_website_certificate_issued_to_oname"
554                         android:layout_height="wrap_content"
555                         android:layout_width="match_parent" />
556
557                     <TextView
558                         android:id="@+id/current_website_certificate_issued_to_uname"
559                         android:layout_height="wrap_content"
560                         android:layout_width="match_parent" />
561
562                     <!-- Current Website Certificate Issued By. -->
563                     <TextView
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" />
571
572                     <TextView
573                         android:id="@+id/current_website_certificate_issued_by_cname"
574                         android:layout_height="wrap_content"
575                         android:layout_width="match_parent" />
576
577                     <TextView
578                         android:id="@+id/current_website_certificate_issued_by_oname"
579                         android:layout_height="wrap_content"
580                         android:layout_width="match_parent" />
581
582                     <TextView
583                         android:id="@+id/current_website_certificate_issued_by_uname"
584                         android:layout_height="wrap_content"
585                         android:layout_width="match_parent" />
586
587                     <!-- Current Website Certificate Valid Dates. -->
588                     <TextView
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" />
596
597                     <TextView
598                         android:id="@+id/current_website_certificate_start_date"
599                         android:layout_height="wrap_content"
600                         android:layout_width="match_parent" />
601
602                     <TextView
603                         android:id="@+id/current_website_certificate_end_date"
604                         android:layout_height="wrap_content"
605                         android:layout_width="match_parent" />
606                 </LinearLayout>
607             </LinearLayout>
608
609             <!-- Load An Encrypted Website Instructions. -->
610             <TextView
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" />
619         </LinearLayout>
620     </LinearLayout>
621 </ScrollView>