1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2022 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<androidx.appcompat.widget.LinearLayoutCompat
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:tools="http://schemas.android.com/tools"
20    android:id="@+id/measurement_fragment"
21    android:layout_width="match_parent"
22    android:layout_height="match_parent"
23    android:orientation="vertical">
24    <androidx.core.widget.NestedScrollView
25        android:layout_width="match_parent"
26        android:layout_height="match_parent"
27        android:scrollbars="vertical"
28        android:focusableInTouchMode="true">
29
30        <LinearLayout
31            android:layout_width="match_parent"
32            android:layout_height="wrap_content"
33            android:orientation="vertical">
34            <View
35                android:id="@+id/adservices_ppapi_title_spacing"
36                android:visibility="@integer/adservices_ppapi_title_spacing"
37                android:layout_height="@dimen/adservices_ppapi_title_spacing_height"
38                android:layout_width="match_parent"/>
39            <TextView
40                android:paddingHorizontal="@dimen/adservices_content_horizontal_padding"
41                android:text="@string/settingsUI_measurement_view_intro_text"
42                style="@style/MainStyle.Body2" />
43            <View
44                android:id="@+id/measurement_switch_bar_spacing"
45                android:visibility="@integer/measurement_switch_bar_spacing"
46                android:layout_height="@dimen/measurement_switch_bar_spacing_height"
47                android:layout_width="match_parent"/>
48
49            <com.android.settingslib.widget.MainSwitchBar
50            android:id="@+id/measurement_switch_bar"
51            android:layout_height="wrap_content"
52            android:layout_width="match_parent"
53            android:title="@string/settingsUI_measurement_switch_title"
54            android:textDirection="locale"/>
55
56            <LinearLayout
57                android:id="@+id/reset_measurement_button"
58                android:layout_width="match_parent"
59                android:layout_height="match_parent"
60                android:orientation="horizontal"
61                android:padding="@dimen/adservices_content_padding"
62                android:background="?android:attr/selectableItemBackground" >
63                <TextView
64                    android:layout_width="wrap_content"
65                    android:layout_height="match_parent"
66                    android:gravity="center_vertical"
67                    android:key="reset_measurement"
68                    android:text="@string/settingsUI_measurement_view_reset_title"
69                    android:textAppearance="@style/TextAppearance.H5"
70                    android:drawableStart="@drawable/ic_restart_alt_24dp"
71                    android:drawablePadding="@dimen/adservices_drawable_padding"/>
72            </LinearLayout>
73
74            <LinearLayout
75                android:layout_width="match_parent"
76                android:layout_height="wrap_content"
77                android:paddingHorizontal="@dimen/adservices_content_horizontal_padding"
78                android:paddingBottom="@dimen/adservices_content_2x_padding"
79                android:focusable="false"
80                android:orientation="vertical">
81                <ImageView
82                    android:layout_width="wrap_content"
83                    android:layout_height="wrap_content"
84                    android:layout_marginTop="@dimen/adservices_footer_content_half_padding"
85                    android:layout_marginBottom="@dimen/adservices_footer_content_padding"
86                    android:src="@drawable/ic_info_icon"
87                    tools:ignore="ContentDescription" />
88                <TextView
89                    android:id="@+id/measurement_footer"
90                    android:text="@string/settingsUI_measurement_view_footer_text"
91                    style="@style/MainStyle.Body2" />
92            </LinearLayout>
93        </LinearLayout>
94    </androidx.core.widget.NestedScrollView>
95</androidx.appcompat.widget.LinearLayoutCompat>
96