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