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:id="@+id/domain_settings_javascript_imageview"
80 android:layout_height="wrap_content"
81 android:layout_width="wrap_content"
82 android:layout_marginEnd="10dp"
83 android:layout_gravity="center_vertical"
84 android:src="@drawable/privacy_mode"
85 tools:ignore="contentDescription" />
88 android:id="@+id/domain_settings_javascript_switch"
89 android:layout_height="wrap_content"
90 android:layout_width="match_parent"
91 android:layout_marginStart="8dp"
92 android:layout_marginTop="14dp"
93 android:layout_marginBottom="14dp"
94 android:text="@string/javascript_enabled"
95 android:textSize="18sp" />
98 <!-- First-Party Cookies. -->
100 android:layout_height="wrap_content"
101 android:layout_width="match_parent"
102 android:orientation="horizontal" >
105 android:id="@+id/domain_settings_first_party_cookies_imageview"
106 android:layout_height="wrap_content"
107 android:layout_width="wrap_content"
108 android:layout_marginTop="1dp"
109 android:layout_marginEnd="10dp"
110 android:layout_gravity="center_vertical"
111 android:src="@drawable/cookies_enabled"
112 android:tint="@color/domain_settings_icon_yellow_tint_selector"
113 tools:ignore="contentDescription" />
116 android:id="@+id/domain_settings_first_party_cookies_switch"
117 android:layout_height="wrap_content"
118 android:layout_width="match_parent"
119 android:layout_marginStart="8dp"
120 android:layout_marginTop="14dp"
121 android:layout_marginBottom="14dp"
122 android:text="@string/first_party_cookies_enabled"
123 android:textSize="18sp" />
126 <!-- Third-Party Cookies. -->
128 android:layout_height="wrap_content"
129 android:layout_width="match_parent"
130 android:orientation="horizontal" >
133 android:id="@+id/domain_settings_third_party_cookies_imageview"
134 android:layout_height="wrap_content"
135 android:layout_width="wrap_content"
136 android:layout_marginTop="1dp"
137 android:layout_marginEnd="10dp"
138 android:layout_gravity="center_vertical"
139 android:src="@drawable/cookies_enabled"
140 android:tint="@color/domain_settings_icon_red_tint_selector"
141 tools:ignore="contentDescription" />
144 android:id="@+id/domain_settings_third_party_cookies_switch"
145 android:layout_height="wrap_content"
146 android:layout_width="match_parent"
147 android:layout_marginStart="8dp"
148 android:layout_marginTop="14dp"
149 android:layout_marginBottom="14dp"
150 android:text="@string/third_party_cookies_enabled"
151 android:textSize="18sp" />
154 <!-- DOM Storage. -->
156 android:layout_height="wrap_content"
157 android:layout_width="match_parent"
158 android:orientation="horizontal" >
161 android:id="@+id/domain_settings_dom_storage_imageview"
162 android:layout_height="wrap_content"
163 android:layout_width="wrap_content"
164 android:layout_marginTop="1dp"
165 android:layout_marginEnd="10dp"
166 android:layout_gravity="center_vertical"
167 android:src="@drawable/dom_storage_enabled"
168 android:tint="@color/domain_settings_icon_yellow_tint_selector"
169 tools:ignore="contentDescription" />
172 android:id="@+id/domain_settings_dom_storage_switch"
173 android:layout_height="wrap_content"
174 android:layout_width="match_parent"
175 android:layout_marginStart="8dp"
176 android:layout_marginTop="14dp"
177 android:layout_marginBottom="14dp"
178 android:text="@string/dom_storage_enabled"
179 android:textSize="18sp" />
184 android:layout_height="wrap_content"
185 android:layout_width="match_parent"
186 android:orientation="horizontal">
189 android:id="@+id/domain_settings_form_data_imageview"
190 android:layout_height="wrap_content"
191 android:layout_width="wrap_content"
192 android:layout_marginTop="1dp"
193 android:layout_marginEnd="10dp"
194 android:layout_gravity="center_vertical"
195 android:src="@drawable/form_data_enabled"
196 android:tint="@color/domain_settings_icon_yellow_tint_selector"
197 tools:ignore="contentDescription" />
200 android:id="@+id/domain_settings_form_data_switch"
201 android:layout_height="wrap_content"
202 android:layout_width="match_parent"
203 android:layout_marginStart="8dp"
204 android:layout_marginTop="14dp"
205 android:layout_marginBottom="14dp"
206 android:text="@string/form_data_enabled"
207 android:textSize="18sp" />
212 android:layout_height="wrap_content"
213 android:layout_width="match_parent"
214 android:orientation="vertical"
215 android:layout_marginTop="14dp"
216 android:layout_marginBottom="14dp" >
219 android:layout_height="wrap_content"
220 android:layout_width="match_parent"
221 android:orientation="horizontal">
224 android:layout_height="wrap_content"
225 android:layout_width="wrap_content"
226 android:layout_marginTop="1dp"
227 android:layout_marginEnd="10dp"
228 android:layout_gravity="center_vertical"
229 android:src="@drawable/user_agent"
230 android:tint="@color/blue_800"
231 android:contentDescription="@string/user_agent" />
234 android:id="@+id/domain_settings_user_agent_spinner"
235 android:layout_height="wrap_content"
236 android:layout_width="match_parent"
237 android:labelFor="@+id/domain_settings_custom_user_agent_edittext"/>
241 android:id="@+id/domain_settings_user_agent_textview"
242 android:layout_height="match_parent"
243 android:layout_width="match_parent"
244 android:layout_marginStart="43dp"
245 android:layout_marginEnd="36dp"
246 android:textSize="13sp"/>
249 android:id="@id/domain_settings_custom_user_agent_edittext"
250 android:layout_height="wrap_content"
251 android:layout_width="match_parent"
252 android:layout_marginStart="38dp"
253 android:layout_marginEnd="60dp"
254 android:inputType="textUri" />
258 <!-- 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. -->
260 android:layout_height="wrap_content"
261 android:layout_width="match_parent"
262 android:orientation="horizontal"
263 android:layout_marginBottom="14dp" >
266 android:layout_height="wrap_content"
267 android:layout_width="wrap_content"
268 android:layout_marginTop="1dp"
269 android:layout_marginEnd="10dp"
270 android:layout_gravity="center_vertical"
271 android:src="@drawable/font_size"
272 android:tint="@color/blue_800"
273 android:contentDescription="@string/font_size" />
276 android:id="@+id/domain_settings_font_size_spinner"
277 android:layout_height="wrap_content"
278 android:layout_width="match_parent"
279 android:layout_marginTop="14dp"
280 android:layout_marginBottom="14dp"/>