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 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" >
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" >
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="@color/blue_800"
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_marginEnd="10dp"
96 android:layout_gravity="center_vertical"
97 tools:ignore="contentDescription" />
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" />
110 <!-- First-Party Cookies. -->
112 android:layout_height="wrap_content"
113 android:layout_width="match_parent"
114 android:orientation="horizontal" >
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" />
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" />
136 <!-- Third-Party Cookies. -->
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" >
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" />
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" />
163 <!-- DOM Storage. -->
165 android:layout_height="wrap_content"
166 android:layout_width="match_parent"
167 android:orientation="horizontal" >
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" />
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" />
191 android:layout_height="wrap_content"
192 android:layout_width="match_parent"
193 android:orientation="horizontal" >
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" />
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" />
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" >
224 android:layout_height="wrap_content"
225 android:layout_width="match_parent"
226 android:orientation="horizontal" >
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"
235 android:contentDescription="@string/user_agent" />
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" />
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" />
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" />
263 android:layout_height="wrap_content"
264 android:layout_width="match_parent"
265 android:orientation="horizontal" >
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"
274 android:contentDescription="@string/font_size" />
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" />
284 <!-- Display Images. -->
286 android:layout_height="wrap_content"
287 android:layout_width="match_parent"
288 android:orientation="horizontal" >
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" />
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" />