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="?attr/iconTintColor"
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:textColor="?attr/primaryTextColorSelector"
108 android:textSize="18sp" />
111 <!-- First-Party Cookies. -->
113 android:layout_height="wrap_content"
114 android:layout_width="match_parent"
115 android:orientation="horizontal" >
118 android:id="@+id/domain_settings_first_party_cookies_imageview"
119 android:layout_height="wrap_content"
120 android:layout_width="wrap_content"
121 android:layout_marginTop="1dp"
122 android:layout_marginEnd="10dp"
123 android:layout_gravity="center_vertical"
124 tools:ignore="contentDescription" />
127 android:id="@+id/domain_settings_first_party_cookies_switch"
128 android:layout_height="wrap_content"
129 android:layout_width="match_parent"
130 android:layout_marginStart="8dp"
131 android:layout_marginTop="14dp"
132 android:layout_marginBottom="14dp"
133 android:text="@string/first_party_cookies_enabled"
134 android:textColor="?attr/primaryTextColorSelector"
135 android:textSize="18sp" />
138 <!-- Third-Party Cookies. -->
140 android:id="@+id/domain_settings_third_party_cookies_linearlayout"
141 android:layout_height="wrap_content"
142 android:layout_width="match_parent"
143 android:orientation="horizontal" >
146 android:id="@+id/domain_settings_third_party_cookies_imageview"
147 android:layout_height="wrap_content"
148 android:layout_width="wrap_content"
149 android:layout_marginTop="1dp"
150 android:layout_marginEnd="10dp"
151 android:layout_gravity="center_vertical"
152 tools:ignore="contentDescription" />
155 android:id="@+id/domain_settings_third_party_cookies_switch"
156 android:layout_height="wrap_content"
157 android:layout_width="match_parent"
158 android:layout_marginStart="8dp"
159 android:layout_marginTop="14dp"
160 android:layout_marginBottom="14dp"
161 android:text="@string/third_party_cookies_enabled"
162 android:textColor="?attr/primaryTextColorSelector"
163 android:textSize="18sp" />
166 <!-- DOM Storage. -->
168 android:layout_height="wrap_content"
169 android:layout_width="match_parent"
170 android:orientation="horizontal" >
173 android:id="@+id/domain_settings_dom_storage_imageview"
174 android:layout_height="wrap_content"
175 android:layout_width="wrap_content"
176 android:layout_marginTop="1dp"
177 android:layout_marginEnd="10dp"
178 android:layout_gravity="center_vertical"
179 tools:ignore="contentDescription" />
182 android:id="@+id/domain_settings_dom_storage_switch"
183 android:layout_height="wrap_content"
184 android:layout_width="match_parent"
185 android:layout_marginStart="8dp"
186 android:layout_marginTop="14dp"
187 android:layout_marginBottom="14dp"
188 android:text="@string/dom_storage_enabled"
189 android:textColor="?attr/primaryTextColorSelector"
190 android:textSize="18sp" />
195 android:layout_height="wrap_content"
196 android:layout_width="match_parent"
197 android:orientation="horizontal" >
200 android:id="@+id/domain_settings_form_data_imageview"
201 android:layout_height="wrap_content"
202 android:layout_width="wrap_content"
203 android:layout_marginTop="1dp"
204 android:layout_marginEnd="10dp"
205 android:layout_gravity="center_vertical"
206 tools:ignore="contentDescription" />
209 android:id="@+id/domain_settings_form_data_switch"
210 android:layout_height="wrap_content"
211 android:layout_width="match_parent"
212 android:layout_marginStart="8dp"
213 android:layout_marginTop="14dp"
214 android:layout_marginBottom="14dp"
215 android:text="@string/form_data_enabled"
216 android:textColor="?attr/primaryTextColorSelector"
217 android:textSize="18sp" />
222 android:layout_height="wrap_content"
223 android:layout_width="match_parent"
224 android:orientation="vertical"
225 android:layout_marginTop="14dp"
226 android:layout_marginBottom="14dp" >
229 android:layout_height="wrap_content"
230 android:layout_width="match_parent"
231 android:orientation="horizontal" >
234 android:layout_height="wrap_content"
235 android:layout_width="wrap_content"
236 android:layout_marginTop="1dp"
237 android:layout_marginEnd="10dp"
238 android:layout_gravity="center_vertical"
239 android:src="@drawable/user_agent_light"
240 android:tint="?attr/iconTintColor"
241 android:contentDescription="@string/user_agent" />
244 android:id="@+id/domain_settings_user_agent_spinner"
245 android:layout_height="wrap_content"
246 android:layout_width="match_parent"
247 android:labelFor="@+id/domain_settings_custom_user_agent_edittext" />
251 android:id="@+id/domain_settings_user_agent_textview"
252 android:layout_height="match_parent"
253 android:layout_width="match_parent"
254 android:layout_marginStart="45dp"
255 android:layout_marginEnd="36dp"
256 android:textSize="13sp" />
259 android:id="@id/domain_settings_custom_user_agent_edittext"
260 android:layout_height="wrap_content"
261 android:layout_width="match_parent"
262 android:layout_marginStart="40dp"
263 android:layout_marginEnd="60dp"
264 android:inputType="textUri" />
269 android:layout_height="wrap_content"
270 android:layout_width="match_parent"
271 android:orientation="horizontal" >
274 android:layout_height="wrap_content"
275 android:layout_width="wrap_content"
276 android:layout_marginTop="1dp"
277 android:layout_marginEnd="10dp"
278 android:layout_gravity="center_vertical"
279 android:src="@drawable/font_size_light"
280 android:tint="?attr/iconTintColor"
281 android:contentDescription="@string/font_size" />
284 android:id="@+id/domain_settings_font_size_spinner"
285 android:layout_height="wrap_content"
286 android:layout_width="match_parent"
287 android:layout_marginTop="14dp"
288 android:layout_marginBottom="14dp" />
291 <!-- Display Images. -->
293 android:layout_height="wrap_content"
294 android:layout_width="match_parent"
295 android:orientation="horizontal" >
298 android:id="@+id/domain_settings_display_webpage_images_imageview"
299 android:layout_height="wrap_content"
300 android:layout_width="wrap_content"
301 android:layout_marginTop="1dp"
302 android:layout_marginEnd="10dp"
303 android:layout_gravity="center_vertical"
304 android:contentDescription="@string/display_webpage_images" />
307 android:id="@+id/domain_settings_display_webpage_images_spinner"
308 android:layout_height="wrap_content"
309 android:layout_width="match_parent"
310 android:layout_marginTop="14dp"
311 android:layout_marginBottom="14dp" />