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_gravity="bottom"
50 android:src="@drawable/domains"
51 android:tint="@color/blue_800"
52 tools:ignore="contentDescription" />
54 <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
55 <android.support.design.widget.TextInputLayout
56 android:layout_height="wrap_content"
57 android:layout_width="match_parent"
58 android:layout_marginStart="6dp"
59 android:layout_marginBottom="14dp" >
61 <!-- `android:inputType="textUri"` disables spell check in the `EditText`. -->
62 <android.support.design.widget.TextInputEditText
63 android:id="@+id/domain_settings_name_edittext"
64 android:layout_width="match_parent"
65 android:layout_height="wrap_content"
66 android:hint="@string/domain_name"
67 android:inputType="textUri" />
68 </android.support.design.widget.TextInputLayout>
73 android:layout_height="wrap_content"
74 android:layout_width="match_parent"
75 android:orientation="horizontal" >
78 android:layout_height="wrap_content"
79 android:layout_width="wrap_content"
80 android:layout_gravity="center_vertical"
81 android:src="@drawable/privacy_mode"
82 tools:ignore="contentDescription" />
85 android:id="@+id/domain_settings_javascript_switch"
86 android:layout_height="wrap_content"
87 android:layout_width="match_parent"
88 android:layout_marginStart="8dp"
89 android:layout_marginTop="14dp"
90 android:layout_marginBottom="14dp"
91 android:text="@string/javascript_enabled"
92 android:textSize="18sp" />
95 <!-- First-Party Cookies. -->
97 android:layout_height="wrap_content"
98 android:layout_width="match_parent"
99 android:orientation="horizontal" >
102 android:layout_height="wrap_content"
103 android:layout_width="wrap_content"
104 android:layout_marginTop="1dp"
105 android:layout_gravity="center_vertical"
106 android:src="@drawable/cookies_enabled"
107 android:tint="@color/blue_800"
108 tools:ignore="contentDescription" />
111 android:id="@+id/domain_settings_first_party_cookies_switch"
112 android:layout_height="wrap_content"
113 android:layout_width="match_parent"
114 android:layout_marginStart="8dp"
115 android:layout_marginTop="14dp"
116 android:layout_marginBottom="14dp"
117 android:text="@string/first_party_cookies_enabled"
118 android:textSize="18sp" />
121 <!-- Third-Party Cookies. -->
123 android:layout_height="wrap_content"
124 android:layout_width="match_parent"
125 android:orientation="horizontal" >
128 android:layout_height="wrap_content"
129 android:layout_width="wrap_content"
130 android:layout_marginTop="1dp"
131 android:layout_gravity="center_vertical"
132 android:src="@drawable/cookies_enabled"
133 android:tint="@color/blue_800"
134 tools:ignore="contentDescription" />
137 android:id="@+id/domain_settings_third_party_cookies_switch"
138 android:layout_height="wrap_content"
139 android:layout_width="match_parent"
140 android:layout_marginStart="8dp"
141 android:layout_marginTop="14dp"
142 android:layout_marginBottom="14dp"
143 android:text="@string/third_party_cookies_enabled"
144 android:textSize="18sp" />
147 <!-- DOM Storage. -->
149 android:layout_height="wrap_content"
150 android:layout_width="match_parent"
151 android:orientation="horizontal" >
154 android:layout_height="wrap_content"
155 android:layout_width="wrap_content"
156 android:layout_marginTop="1dp"
157 android:layout_gravity="center_vertical"
158 android:src="@drawable/dom_storage_enabled"
159 android:tint="@color/blue_800"
160 tools:ignore="contentDescription" />
163 android:id="@+id/domain_settings_dom_storage_switch"
164 android:layout_height="wrap_content"
165 android:layout_width="match_parent"
166 android:layout_marginStart="8dp"
167 android:layout_marginTop="14dp"
168 android:layout_marginBottom="14dp"
169 android:text="@string/dom_storage_enabled"
170 android:textSize="18sp" />
175 android:layout_height="wrap_content"
176 android:layout_width="match_parent"
177 android:orientation="horizontal">
180 android:layout_height="wrap_content"
181 android:layout_width="wrap_content"
182 android:layout_marginTop="1dp"
183 android:layout_gravity="center_vertical"
184 android:src="@drawable/form_data_enabled"
185 android:tint="@color/blue_800"
186 tools:ignore="contentDescription" />
189 android:id="@+id/domain_settings_form_data_switch"
190 android:layout_height="wrap_content"
191 android:layout_width="match_parent"
192 android:layout_marginStart="8dp"
193 android:layout_marginTop="14dp"
194 android:layout_marginBottom="14dp"
195 android:text="@string/form_data_enabled"
196 android:textSize="18sp" />
201 android:layout_height="wrap_content"
202 android:layout_width="match_parent"
203 android:orientation="horizontal">
206 android:layout_height="wrap_content"
207 android:layout_width="wrap_content"
208 android:layout_marginTop="1dp"
209 android:layout_gravity="center_vertical"
210 android:src="@drawable/user_agent"
211 android:tint="@color/blue_800"
212 android:contentDescription="@string/user_agent" />
215 android:id="@+id/domain_settings_user_agent_spinner"
216 android:layout_height="wrap_content"
217 android:layout_width="match_parent"
218 android:layout_marginTop="14dp"
219 android:layout_marginBottom="14dp" />
223 <!-- 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. -->
225 android:layout_height="wrap_content"
226 android:layout_width="match_parent"
227 android:orientation="horizontal"
228 android:layout_marginBottom="14dp" >
231 android:layout_height="wrap_content"
232 android:layout_width="wrap_content"
233 android:layout_marginTop="1dp"
234 android:layout_gravity="center_vertical"
235 android:src="@drawable/font_size"
236 android:tint="@color/blue_800"
237 android:contentDescription="@string/font_size" />
240 android:id="@+id/domain_settings_font_size_spinner"
241 android:layout_height="wrap_content"
242 android:layout_width="match_parent"
243 android:layout_marginTop="14dp"
244 android:layout_marginBottom="14dp"/>