[fenix] For https://github.com/mozilla-mobile/fenix/issues/24252 - Rename primaryText...
[gecko.git] / mobile / android / fenix / app / src / main / res / layout / component_tracking_protection_panel.xml
blobab3763267cc20eb409349df0a45b68d278960144
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
3    - License, v. 2.0. If a copy of the MPL was not distributed with this
4    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
6 <androidx.constraintlayout.widget.ConstraintLayout
7     xmlns:android="http://schemas.android.com/apk/res/android"
8     xmlns:app="http://schemas.android.com/apk/res-auto"
9     xmlns:tools="http://schemas.android.com/tools"
10     android:id="@+id/panel_wrapper"
11     android:layout_width="match_parent"
12     android:layout_height="wrap_content"
13     android:background="?foundation">
15     <androidx.constraintlayout.widget.ConstraintLayout
16         android:id="@+id/normal_mode"
17         android:layout_width="match_parent"
18         android:layout_height="wrap_content"
19         app:layout_constraintBottom_toBottomOf="parent"
20         app:layout_constraintTop_toTopOf="parent">
22         <ImageView
23             android:id="@+id/navigate_back"
24             android:layout_width="@dimen/tracking_protection_item_height"
25             android:layout_height="@dimen/tracking_protection_item_height"
26             android:scaleType="center"
27             android:contentDescription="@string/etp_back_button_content_description"
28             app:layout_constraintStart_toStartOf="parent"
29             app:layout_constraintTop_toTopOf="parent"
30             app:srcCompat="@drawable/mozac_ic_back"
31             app:tint="?attr/textPrimary" />
33         <TextView
34             android:id="@+id/details"
35             style="@style/QuickSettingsLargeText"
36             android:layout_width="wrap_content"
37             android:layout_height="@dimen/tracking_protection_item_height"
38             android:paddingStart="0dp"
39             android:paddingEnd="0dp"
40             android:textColor="?attr/textPrimary"
41             app:fontFamily="@font/metropolis_semibold"
42             app:layout_constraintStart_toEndOf="@+id/navigate_back"
43             app:layout_constraintTop_toTopOf="parent"
44             android:text="@string/enhanced_tracking_protection_details" />
46         <TextView
47             android:id="@+id/blocking_header"
48             style="@style/QuickSettingsText"
49             android:accessibilityHeading="true"
50             android:layout_width="wrap_content"
51             android:layout_height="@dimen/tracking_protection_item_height"
52             android:text="@string/enhanced_tracking_protection_blocked"
53             android:textColor="?attr/textPrimary"
54             android:textStyle="bold"
55             android:visibility="gone"
56             app:layout_constraintStart_toStartOf="parent"
57             app:layout_constraintTop_toBottomOf="@id/details"
58             tools:targetApi="p" />
60         <TextView
61             android:id="@+id/cross_site_tracking"
62             style="@style/QuickSettingsLargeText.Icon"
63             android:layout_width="match_parent"
64             android:layout_height="@dimen/tracking_protection_item_height"
65             android:text="@string/etp_cookies_title"
66             android:visibility="gone"
67             app:layout_constraintTop_toBottomOf="@id/blocking_header" />
69         <TextView
70             android:id="@+id/fingerprinters"
71             style="@style/QuickSettingsLargeText.Icon"
72             android:layout_width="match_parent"
73             android:layout_height="@dimen/tracking_protection_item_height"
74             android:text="@string/etp_fingerprinters_title"
75             android:visibility="gone"
76             app:layout_constraintTop_toBottomOf="@id/cross_site_tracking" />
78         <TextView
79             android:id="@+id/cryptominers"
80             style="@style/QuickSettingsLargeText.Icon"
81             android:layout_width="match_parent"
82             android:layout_height="@dimen/tracking_protection_item_height"
83             android:text="@string/etp_cryptominers_title"
84             android:visibility="gone"
85             app:layout_constraintTop_toBottomOf="@id/fingerprinters" />
87         <TextView
88             android:id="@+id/social_media_trackers"
89             style="@style/QuickSettingsLargeText.Icon"
90             android:layout_width="match_parent"
91             android:layout_height="@dimen/tracking_protection_item_height"
92             android:text="@string/etp_social_media_trackers_title"
93             android:visibility="gone"
94             app:layout_constraintTop_toBottomOf="@id/cryptominers" />
96         <TextView
97             android:id="@+id/tracking_content"
98             style="@style/QuickSettingsLargeText.Icon"
99             android:layout_width="match_parent"
100             android:layout_height="@dimen/tracking_protection_item_height"
101             android:text="@string/etp_tracking_content_title"
102             android:visibility="gone"
103             app:layout_constraintTop_toBottomOf="@id/social_media_trackers" />
105         <TextView
106             android:id="@+id/redirect_trackers"
107             style="@style/QuickSettingsLargeText.Icon"
108             android:layout_width="match_parent"
109             android:layout_height="@dimen/tracking_protection_item_height"
110             android:text="@string/etp_redirect_trackers_title"
111             android:visibility="gone"
112             app:layout_constraintTop_toBottomOf="@id/tracking_content" />
114         <TextView
115             android:id="@+id/not_blocking_header"
116             style="@style/QuickSettingsText"
117             android:layout_width="wrap_content"
118             android:accessibilityHeading="true"
119             android:layout_height="@dimen/tracking_protection_item_height"
120             android:text="@string/enhanced_tracking_protection_allowed"
121             android:textStyle="bold"
122             android:visibility="gone"
123             app:layout_constraintStart_toStartOf="parent"
124             app:layout_constraintTop_toBottomOf="@id/tracking_content"
125             tools:targetApi="p" />
127         <TextView
128             android:id="@+id/cross_site_tracking_loaded"
129             style="@style/QuickSettingsLargeText.Icon"
130             android:layout_width="match_parent"
131             android:layout_height="@dimen/tracking_protection_item_height"
132             android:text="@string/etp_cookies_title"
133             android:visibility="gone"
134             app:layout_constraintTop_toBottomOf="@id/not_blocking_header" />
136         <TextView
137             android:id="@+id/fingerprinters_loaded"
138             style="@style/QuickSettingsLargeText.Icon"
139             android:layout_width="match_parent"
140             android:layout_height="@dimen/tracking_protection_item_height"
141             android:text="@string/etp_fingerprinters_title"
142             android:visibility="gone"
143             app:layout_constraintTop_toBottomOf="@id/cross_site_tracking_loaded" />
145         <TextView
146             android:id="@+id/cryptominers_loaded"
147             style="@style/QuickSettingsLargeText.Icon"
148             android:layout_width="match_parent"
149             android:layout_height="@dimen/tracking_protection_item_height"
150             android:text="@string/etp_cryptominers_title"
151             android:visibility="gone"
152             app:layout_constraintTop_toBottomOf="@id/fingerprinters_loaded" />
154         <TextView
155             android:id="@+id/social_media_trackers_loaded"
156             style="@style/QuickSettingsLargeText.Icon"
157             android:layout_width="match_parent"
158             android:layout_height="@dimen/tracking_protection_item_height"
159             android:text="@string/etp_social_media_trackers_title"
160             android:visibility="gone"
161             app:layout_constraintTop_toBottomOf="@id/cryptominers_loaded" />
163         <TextView
164             android:id="@+id/tracking_content_loaded"
165             style="@style/QuickSettingsLargeText.Icon"
166             android:layout_width="match_parent"
167             android:layout_height="@dimen/tracking_protection_item_height"
168             android:text="@string/etp_tracking_content_title"
169             android:visibility="gone"
170             app:layout_constraintTop_toBottomOf="@id/social_media_trackers_loaded" />
172         <TextView
173             android:id="@+id/redirect_trackers_loaded"
174             style="@style/QuickSettingsLargeText.Icon"
175             android:layout_width="match_parent"
176             android:layout_height="@dimen/tracking_protection_item_height"
177             android:text="@string/etp_redirect_trackers_title"
178             android:visibility="gone"
179             app:layout_constraintTop_toBottomOf="@id/tracking_content_loaded" />
181         <View
182             android:id="@+id/line_divider"
183             android:layout_width="match_parent"
184             android:layout_height="1dp"
185             android:background="?borderPrimary"
186             app:layout_constraintTop_toBottomOf="@id/tracking_content_loaded" />
188         <TextView
189             android:id="@+id/protection_settings"
190             style="@style/QuickSettingsLargeText.Icon"
191             android:layout_width="match_parent"
192             android:layout_height="@dimen/tracking_protection_item_height"
193             android:text="@string/etp_settings"
194             app:drawableStartCompat="@drawable/mozac_ic_settings"
195             app:drawableTint="?attr/textPrimary"
196             app:layout_constraintTop_toBottomOf="@id/line_divider" />
197     </androidx.constraintlayout.widget.ConstraintLayout>
199     <androidx.constraintlayout.widget.ConstraintLayout
200         android:id="@+id/details_mode"
201         android:layout_width="match_parent"
202         android:layout_height="wrap_content"
203         android:visibility="gone"
204         app:layout_constraintBottom_toBottomOf="parent"
205         app:layout_constraintTop_toTopOf="parent">
207         <ImageView
208             android:id="@+id/details_back"
209             android:layout_width="wrap_content"
210             android:layout_height="wrap_content"
211             android:layout_marginStart="20dp"
212             app:tint="?attr/textPrimary"
213             android:contentDescription="@string/etp_back_button_content_description"
214             app:layout_constraintBottom_toBottomOf="@+id/category_description"
215             app:layout_constraintStart_toStartOf="parent"
216             app:layout_constraintTop_toTopOf="@id/category_title"
217             app:layout_constraintVertical_bias="0.0"
218             app:srcCompat="@drawable/mozac_ic_back" />
220         <TextView
221             android:id="@+id/category_title"
222             android:layout_width="match_parent"
223             android:layout_height="wrap_content"
224             android:layout_marginStart="52dp"
225             android:layout_marginTop="11dp"
226             android:layout_marginEnd="19dp"
227             android:textColor="?attr/textPrimary"
228             android:textSize="16sp"
229             app:fontFamily="@font/metropolis_semibold"
230             app:layout_constraintTop_toTopOf="parent"
231             tools:text="@tools:sample/lorem" />
233         <TextView
234             android:id="@+id/category_description"
235             android:layout_width="0dp"
236             android:layout_height="wrap_content"
237             android:layout_marginStart="52dp"
238             android:layout_marginEnd="19dp"
239             android:textColor="?secondaryText"
240             app:layout_constraintEnd_toEndOf="parent"
241             app:layout_constraintStart_toStartOf="parent"
242             app:layout_constraintTop_toBottomOf="@id/category_title"
243             tools:text="@tools:sample/lorem" />
245         <TextView
246             android:id="@+id/smartblock_description"
247             android:layout_width="0dp"
248             android:layout_height="wrap_content"
249             android:layout_marginStart="52dp"
250             android:layout_marginEnd="19dp"
251             android:layout_marginTop="8dp"
252             android:layout_marginBottom="8dp"
253             android:textColor="?secondaryText"
254             android:visibility="gone"
255             app:layout_constraintEnd_toEndOf="parent"
256             app:layout_constraintStart_toStartOf="parent"
257             app:layout_constraintTop_toBottomOf="@id/category_description"
258             android:text="@string/preference_etp_smartblock_description" />
260         <org.mozilla.fenix.utils.LinkTextView
261             android:id="@+id/smartblock_learn_more"
262             android:layout_width="0dp"
263             android:layout_height="wrap_content"
264             android:text="@string/preference_etp_smartblock_learn_more"
265             android:textColor="?textAccent"
266             android:visibility="gone"
267             app:layout_constraintEnd_toEndOf="parent"
268             app:layout_constraintStart_toStartOf="@id/smartblock_description"
269             app:layout_constraintTop_toBottomOf="@id/smartblock_description" />
271         <View
272             android:id="@+id/line_divider_details"
273             android:layout_width="match_parent"
274             android:layout_height="1dp"
275             android:layout_marginTop="12dp"
276             android:layout_marginBottom="8dp"
277             android:background="?borderPrimary"
278             app:layout_constraintTop_toBottomOf="@id/smartblock_learn_more" />
280         <androidx.appcompat.widget.LinearLayoutCompat
281             android:id="@+id/blocking_scrollview"
282             android:layout_width="match_parent"
283             android:layout_height="wrap_content"
284             android:fillViewport="true"
285             android:scrollbars="vertical"
286             android:orientation="vertical"
287             android:isScrollContainer="true"
288             app:layout_constraintEnd_toEndOf="parent"
289             app:layout_constraintStart_toStartOf="parent"
290             app:layout_constraintTop_toBottomOf="@id/line_divider_details">
292             <TextView
293                 android:id="@+id/details_blocking_header"
294                 android:accessibilityHeading="true"
295                 style="@style/QuickSettingsText"
296                 android:layout_width="wrap_content"
297                 android:layout_height="@dimen/tracking_protection_item_height"
298                 android:layout_marginStart="52dp"
299                 android:layout_marginEnd="26dp"
300                 android:paddingStart="0dp"
301                 android:paddingEnd="0dp"
302                 android:text="@string/enhanced_tracking_protection_blocked"
303                 android:textStyle="bold"
304                 app:layout_constraintStart_toStartOf="parent"
305                 app:layout_constraintTop_toBottomOf="@id/blocking_scrollview"
306                 tools:targetApi="p" />
308             <TextView
309                 android:id="@+id/blocking_text_list"
310                 android:layout_width="match_parent"
311                 android:layout_height="wrap_content"
312                 android:layout_marginStart="52dp"
313                 android:layout_marginEnd="26dp"
314                 android:lineSpacingMultiplier="1.2"
315                 android:layout_marginBottom="12dp"
316                 tools:text="@tools:sample/lorem/random" />
317         </androidx.appcompat.widget.LinearLayoutCompat>
318     </androidx.constraintlayout.widget.ConstraintLayout>
319 </androidx.constraintlayout.widget.ConstraintLayout>