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="horizontal" >
46 android:layout_height="wrap_content"
47 android:layout_width="wrap_content"
48 android:layout_marginBottom="26dp"
49 android:layout_marginEnd="10dp"
50 android:layout_gravity="bottom"
51 android:src="@drawable/domains"
52 android:tint="@color/blue_800"
53 tools:ignore="contentDescription" />
55 <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
56 <android.support.design.widget.TextInputLayout
57 android:layout_height="wrap_content"
58 android:layout_width="match_parent"
59 android:layout_marginStart="6dp"
60 android:layout_marginBottom="14dp" >
62 <!-- `android:inputType="textUri"` disables spell check in the `EditText`. -->
63 <android.support.design.widget.TextInputEditText
64 android:id="@+id/domain_settings_name_edittext"
65 android:layout_width="match_parent"
66 android:layout_height="wrap_content"
67 android:hint="@string/domain_name"
68 android:inputType="textUri" />
69 </android.support.design.widget.TextInputLayout>
74 android:layout_height="wrap_content"
75 android:layout_width="match_parent"
76 android:orientation="horizontal" >
79 android:layout_height="wrap_content"
80 android:layout_width="wrap_content"
81 android:layout_marginEnd="10dp"
82 android:layout_gravity="center_vertical"
83 android:src="@drawable/privacy_mode"
84 tools:ignore="contentDescription" />
87 android:id="@+id/domain_settings_javascript_switch"
88 android:layout_height="wrap_content"
89 android:layout_width="match_parent"
90 android:layout_marginStart="8dp"
91 android:layout_marginTop="14dp"
92 android:layout_marginBottom="14dp"
93 android:text="@string/javascript_enabled"
94 android:textSize="18sp" />
97 <!-- First-Party Cookies. -->
99 android:layout_height="wrap_content"
100 android:layout_width="match_parent"
101 android:orientation="horizontal" >
104 android:layout_height="wrap_content"
105 android:layout_width="wrap_content"
106 android:layout_marginTop="1dp"
107 android:layout_marginEnd="10dp"
108 android:layout_gravity="center_vertical"
109 android:src="@drawable/cookies_enabled"
110 android:tint="@color/blue_800"
111 tools:ignore="contentDescription" />
114 android:id="@+id/domain_settings_first_party_cookies_switch"
115 android:layout_height="wrap_content"
116 android:layout_width="match_parent"
117 android:layout_marginStart="8dp"
118 android:layout_marginTop="14dp"
119 android:layout_marginBottom="14dp"
120 android:text="@string/first_party_cookies_enabled"
121 android:textSize="18sp" />
124 <!-- Third-Party Cookies. -->
126 android:layout_height="wrap_content"
127 android:layout_width="match_parent"
128 android:orientation="horizontal" >
131 android:layout_height="wrap_content"
132 android:layout_width="wrap_content"
133 android:layout_marginTop="1dp"
134 android:layout_marginEnd="10dp"
135 android:layout_gravity="center_vertical"
136 android:src="@drawable/cookies_enabled"
137 android:tint="@color/blue_800"
138 tools:ignore="contentDescription" />
141 android:id="@+id/domain_settings_third_party_cookies_switch"
142 android:layout_height="wrap_content"
143 android:layout_width="match_parent"
144 android:layout_marginStart="8dp"
145 android:layout_marginTop="14dp"
146 android:layout_marginBottom="14dp"
147 android:text="@string/third_party_cookies_enabled"
148 android:textSize="18sp" />
151 <!-- DOM Storage. -->
153 android:layout_height="wrap_content"
154 android:layout_width="match_parent"
155 android:orientation="horizontal" >
158 android:layout_height="wrap_content"
159 android:layout_width="wrap_content"
160 android:layout_marginTop="1dp"
161 android:layout_marginEnd="10dp"
162 android:layout_gravity="center_vertical"
163 android:src="@drawable/dom_storage_enabled"
164 android:tint="@color/blue_800"
165 tools:ignore="contentDescription" />
168 android:id="@+id/domain_settings_dom_storage_switch"
169 android:layout_height="wrap_content"
170 android:layout_width="match_parent"
171 android:layout_marginStart="8dp"
172 android:layout_marginTop="14dp"
173 android:layout_marginBottom="14dp"
174 android:text="@string/dom_storage_enabled"
175 android:textSize="18sp" />
180 android:layout_height="wrap_content"
181 android:layout_width="match_parent"
182 android:orientation="horizontal">
185 android:layout_height="wrap_content"
186 android:layout_width="wrap_content"
187 android:layout_marginTop="1dp"
188 android:layout_marginEnd="10dp"
189 android:layout_gravity="center_vertical"
190 android:src="@drawable/form_data_enabled"
191 android:tint="@color/blue_800"
192 tools:ignore="contentDescription" />
195 android:id="@+id/domain_settings_form_data_switch"
196 android:layout_height="wrap_content"
197 android:layout_width="match_parent"
198 android:layout_marginStart="8dp"
199 android:layout_marginTop="14dp"
200 android:layout_marginBottom="14dp"
201 android:text="@string/form_data_enabled"
202 android:textSize="18sp" />
207 android:layout_height="wrap_content"
208 android:layout_width="match_parent"
209 android:orientation="vertical"
210 android:layout_marginTop="14dp"
211 android:layout_marginBottom="14dp" >
214 android:layout_height="wrap_content"
215 android:layout_width="match_parent"
216 android:orientation="horizontal">
219 android:layout_height="wrap_content"
220 android:layout_width="wrap_content"
221 android:layout_marginTop="1dp"
222 android:layout_marginEnd="10dp"
223 android:layout_gravity="center_vertical"
224 android:src="@drawable/user_agent"
225 android:tint="@color/blue_800"
226 android:contentDescription="@string/user_agent" />
229 android:id="@+id/domain_settings_user_agent_spinner"
230 android:layout_height="wrap_content"
231 android:layout_width="match_parent"
232 android:labelFor="@+id/domain_settings_custom_user_agent_edittext"/>
236 android:id="@+id/domain_settings_user_agent_textview"
237 android:layout_height="match_parent"
238 android:layout_width="match_parent"
239 android:layout_marginStart="43dp"
240 android:layout_marginEnd="36dp"
241 android:textSize="13sp"/>
244 android:id="@id/domain_settings_custom_user_agent_edittext"
245 android:layout_height="wrap_content"
246 android:layout_width="match_parent"
247 android:layout_marginStart="38dp"
248 android:layout_marginEnd="60dp"
249 android:inputType="textUri" />
253 <!-- We need to add an extra `android:layout_marginBottom="14dp"` to the last `LinearLayout` or the bottom of the `ScrollView` gets cutoff if API 25. -->
255 android:layout_height="wrap_content"
256 android:layout_width="match_parent"
257 android:orientation="horizontal"
258 android:layout_marginBottom="14dp" >
261 android:layout_height="wrap_content"
262 android:layout_width="wrap_content"
263 android:layout_marginTop="1dp"
264 android:layout_marginEnd="10dp"
265 android:layout_gravity="center_vertical"
266 android:src="@drawable/font_size"
267 android:tint="@color/blue_800"
268 android:contentDescription="@string/font_size" />
271 android:id="@+id/domain_settings_font_size_spinner"
272 android:layout_height="wrap_content"
273 android:layout_width="match_parent"
274 android:layout_marginTop="14dp"
275 android:layout_marginBottom="14dp"/>