-
Notifications
You must be signed in to change notification settings - Fork 510
/
administrator_controls_download_permissions_view.xml
155 lines (142 loc) · 6.68 KB
/
administrator_controls_download_permissions_view.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:app="https://schemas.android.com/apk/res-auto">
<data>
<variable
name="viewModel"
type="org.oppia.android.app.administratorcontrols.administratorcontrolsitemviewmodel.AdministratorControlsDownloadPermissionsViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/download_permissions_text_view"
style="@style/Caption"
android:layout_width="match_parent"
android:background="@color/mid_grey_30"
android:paddingStart="36dp"
android:paddingTop="28dp"
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_download_permissions_label"
android:textColor="@color/colorPrimary"
app:layout_constraintBottom_toTopOf="@id/topic_update_on_wifi_constraint_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/topic_update_on_wifi_constraint_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:importantForAccessibility="yes"
android:onClick="@{(view) -> viewModel.onTopicWifiUpdatePermissionChanged()}"
android:paddingStart="36dp"
android:paddingTop="20dp"
android:paddingEnd="36dp"
android:paddingBottom="20dp"
app:layout_constraintBottom_toTopOf="@id/view_divider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/download_permissions_text_view">
<TextView
android:id="@+id/topic_update_on_wifi_title_text_view"
style="@style/Body"
android:background="@color/white"
android:paddingBottom="4dp"
android:text="@string/administrator_controls_update_on_wifi_title"
android:textColor="@color/oppiaPrimaryTextDark"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/topic_update_on_wifi_description_text_view"
style="@style/Subtitle2"
android:layout_width="0dp"
android:background="@color/white"
android:text="@string/administrator_controls_update_on_wifi_message"
android:textColor="@color/accessible_light_grey"
app:layout_constraintEnd_toStartOf="@id/topic_update_on_wifi_switch"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/topic_update_on_wifi_title_text_view" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/topic_update_on_wifi_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:checked="@{viewModel.isTopicWifiUpdatePermission}"
android:clickable="false"
android:focusable="false"
android:minWidth="48dp"
android:minHeight="48dp"
android:theme="@style/SwitchCompatTheme"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/topic_update_on_wifi_description_text_view"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:id="@+id/view_divider"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@color/mid_grey_30"
app:layout_constraintBottom_toTopOf="@id/auto_update_topic_constraint_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/topic_update_on_wifi_constraint_layout" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/auto_update_topic_constraint_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:importantForAccessibility="yes"
android:onClick="@{(view) -> viewModel.onTopicAutoUpdatePermissionChanged()}"
android:paddingStart="36dp"
android:paddingTop="20dp"
android:paddingEnd="36dp"
android:paddingBottom="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/view_divider">
<TextView
android:id="@+id/auto_update_topic_title_text_view"
style="@style/Body"
android:background="@color/white"
android:paddingBottom="4dp"
android:text="@string/administrator_controls_auto_update_title"
android:textColor="@color/oppiaPrimaryTextDark"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/auto_update_topic_description_text_view"
style="@style/Subtitle2"
android:layout_width="0dp"
android:background="@color/white"
android:text="@string/administrator_controls_auto_update_message"
android:textColor="@color/accessible_light_grey"
app:layout_constraintEnd_toStartOf="@id/auto_update_topic_switch"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/auto_update_topic_title_text_view" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/auto_update_topic_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:checked="@{viewModel.isTopicAutoUpdatePermission}"
android:clickable="false"
android:focusable="false"
android:minWidth="48dp"
android:minHeight="48dp"
android:theme="@style/SwitchCompatTheme"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/auto_update_topic_description_text_view"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>