|
1 | | -<?xml version="1.0" encoding="utf-8"?> |
2 | | -<!-- |
| 1 | +<?xml version="1.0" encoding="utf-8"?><!-- |
3 | 2 | Copyright 2025 Google LLC |
4 | 3 |
|
5 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
|
16 | 15 | --> |
17 | 16 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
18 | 17 | xmlns:app="http://schemas.android.com/apk/res-auto" |
19 | | - android:layout_width="match_parent" |
20 | 18 | android:id="@+id/map_container" |
| 19 | + android:layout_width="match_parent" |
21 | 20 | android:layout_height="match_parent"> |
22 | 21 |
|
23 | 22 | <com.google.android.material.appbar.MaterialToolbar |
|
30 | 29 | app:layout_constraintTop_toTopOf="parent" |
31 | 30 | app:title="@string/background_color_customization_demo_label" |
32 | 31 | app:titleTextColor="?attr/colorOnPrimary" /> |
| 32 | + |
33 | 33 | <androidx.fragment.app.FragmentContainerView |
34 | 34 | android:id="@+id/map" |
| 35 | + class="com.google.android.gms.maps.SupportMapFragment" |
35 | 36 | android:layout_width="match_parent" |
36 | | - android:layout_height="match_parent" |
37 | | - class="com.google.android.gms.maps.SupportMapFragment" /> |
| 37 | + android:layout_height="match_parent" /> |
| 38 | + |
38 | 39 | <LinearLayout |
| 40 | + android:id="@+id/first_container" |
| 41 | + android:layout_width="match_parent" |
| 42 | + android:layout_height="wrap_content" |
39 | 43 | android:background="@color/white" |
40 | 44 | android:baselineAligned="false" |
41 | 45 | app:layout_constraintEnd_toEndOf="parent" |
42 | 46 | app:layout_constraintStart_toStartOf="parent" |
43 | | - app:layout_constraintTop_toBottomOf="@id/top_bar" |
44 | | - android:id="@+id/first_container" |
45 | | - android:layout_width="match_parent" |
46 | | - android:layout_height="wrap_content"> |
| 47 | + app:layout_constraintTop_toBottomOf="@id/top_bar"> |
47 | 48 |
|
48 | 49 | <LinearLayout |
49 | 50 | android:layout_width="wrap_content" |
|
63 | 64 | android:layout_height="wrap_content" |
64 | 65 | android:checked="true" |
65 | 66 | android:onClick="onToggleAnimate" |
66 | | - android:textOn="@string/animate" |
67 | | - android:textOff="@string/animate" /> |
| 67 | + android:textOff="@string/animate" |
| 68 | + android:textOn="@string/animate" /> |
68 | 69 | </LinearLayout> |
69 | 70 |
|
70 | 71 | <RelativeLayout |
71 | 72 | android:layout_width="0dp" |
72 | 73 | android:layout_height="match_parent" |
73 | | - android:gravity="center_horizontal" |
74 | | - android:layout_weight="1"> |
| 74 | + android:layout_weight="1" |
| 75 | + android:gravity="center_horizontal"> |
75 | 76 |
|
76 | 77 | <com.google.android.material.button.MaterialButton |
77 | 78 | android:id="@+id/scroll_left" |
78 | 79 | android:layout_width="wrap_content" |
79 | 80 | android:layout_height="wrap_content" |
80 | | - android:minWidth="48dp" |
81 | | - android:onClick="onScrollLeft" |
82 | 81 | android:layout_alignParentLeft="true" |
83 | 82 | android:layout_centerVertical="true" |
| 83 | + android:minWidth="48dp" |
| 84 | + android:onClick="onScrollLeft" |
84 | 85 | android:text="@string/left_arrow" /> |
85 | 86 |
|
86 | 87 | <com.google.android.material.button.MaterialButton |
87 | 88 | android:id="@+id/scroll_up" |
88 | 89 | android:layout_width="wrap_content" |
89 | 90 | android:layout_height="wrap_content" |
90 | | - android:minWidth="48dp" |
91 | | - android:onClick="onScrollUp" |
92 | 91 | android:layout_alignParentTop="true" |
93 | 92 | android:layout_toRightOf="@id/scroll_left" |
| 93 | + android:minWidth="48dp" |
| 94 | + android:onClick="onScrollUp" |
94 | 95 | android:text="@string/up_arrow" /> |
95 | 96 |
|
96 | 97 | <com.google.android.material.button.MaterialButton |
97 | 98 | android:id="@+id/scroll_down" |
98 | 99 | android:layout_width="wrap_content" |
99 | 100 | android:layout_height="wrap_content" |
100 | | - android:minWidth="48dp" |
101 | | - android:onClick="onScrollDown" |
102 | 101 | android:layout_below="@id/scroll_up" |
103 | 102 | android:layout_toRightOf="@id/scroll_left" |
| 103 | + android:minWidth="48dp" |
| 104 | + android:onClick="onScrollDown" |
104 | 105 | android:text="@string/down_arrow" /> |
105 | 106 |
|
106 | 107 | <com.google.android.material.button.MaterialButton |
107 | 108 | android:id="@+id/scroll_right" |
108 | 109 | android:layout_width="wrap_content" |
109 | 110 | android:layout_height="wrap_content" |
110 | | - android:minWidth="48dp" |
111 | | - android:onClick="onScrollRight" |
112 | 111 | android:layout_centerVertical="true" |
113 | 112 | android:layout_toRightOf="@id/scroll_down" |
| 113 | + android:minWidth="48dp" |
| 114 | + android:onClick="onScrollRight" |
114 | 115 | android:text="@string/right_arrow" /> |
115 | 116 | </RelativeLayout> |
116 | 117 |
|
|
138 | 139 | </LinearLayout> |
139 | 140 |
|
140 | 141 | <LinearLayout |
141 | | - android:orientation="vertical" |
142 | 142 | android:layout_width="wrap_content" |
143 | 143 | android:layout_height="fill_parent" |
144 | | - android:layout_gravity="right"> |
| 144 | + android:layout_gravity="right" |
| 145 | + android:orientation="vertical"> |
145 | 146 |
|
146 | 147 | <com.google.android.material.button.MaterialButton |
147 | 148 | android:id="@+id/tilt_more" |
148 | 149 | android:layout_width="wrap_content" |
149 | 150 | android:layout_height="wrap_content" |
150 | 151 | android:minWidth="48dp" |
151 | | - android:text="@string/tilt_more" |
152 | | - android:onClick="onTiltMore" /> |
| 152 | + android:onClick="onTiltMore" |
| 153 | + android:text="@string/tilt_more" /> |
153 | 154 |
|
154 | 155 | <com.google.android.material.button.MaterialButton |
155 | 156 | android:id="@+id/tilt_less" |
156 | 157 | android:layout_width="wrap_content" |
157 | 158 | android:layout_height="wrap_content" |
158 | 159 | android:minWidth="48dp" |
159 | | - android:text="@string/tilt_less" |
160 | | - android:onClick="onTiltLess" /> |
| 160 | + android:onClick="onTiltLess" |
| 161 | + android:text="@string/tilt_less" /> |
161 | 162 | </LinearLayout> |
162 | 163 | </LinearLayout> |
163 | 164 |
|
164 | 165 | <LinearLayout |
| 166 | + android:id="@+id/second_container" |
| 167 | + android:layout_width="match_parent" |
| 168 | + android:layout_height="wrap_content" |
165 | 169 | android:background="@color/white" |
166 | 170 | app:layout_constraintEnd_toEndOf="parent" |
167 | 171 | app:layout_constraintStart_toStartOf="parent" |
168 | | - app:layout_constraintTop_toBottomOf="@id/first_container" |
169 | | - android:id="@+id/second_container" |
170 | | - android:layout_width="match_parent" |
171 | | - android:layout_height="wrap_content"> |
| 172 | + app:layout_constraintTop_toBottomOf="@id/first_container"> |
172 | 173 |
|
173 | 174 | <com.google.android.material.checkbox.MaterialCheckBox |
174 | 175 | android:id="@+id/duration_toggle" |
|
186 | 187 | </LinearLayout> |
187 | 188 |
|
188 | 189 | <LinearLayout |
| 190 | + android:id="@+id/third_container" |
| 191 | + android:layout_width="match_parent" |
| 192 | + android:layout_height="wrap_content" |
189 | 193 | android:background="@color/white" |
190 | 194 | app:layout_constraintEnd_toEndOf="parent" |
191 | 195 | app:layout_constraintStart_toStartOf="parent" |
192 | | - app:layout_constraintTop_toBottomOf="@id/second_container" |
193 | | - android:id="@+id/third_container" |
194 | | - android:layout_width="match_parent" |
195 | | - android:layout_height="wrap_content"> |
| 196 | + app:layout_constraintTop_toBottomOf="@id/second_container"> |
196 | 197 |
|
197 | 198 | <com.google.android.material.button.MaterialButton |
198 | 199 | android:id="@+id/sydney" |
199 | 200 | android:layout_width="0dp" |
200 | 201 | android:layout_height="wrap_content" |
201 | | - android:onClick="onGoToSydney" |
202 | 202 | android:layout_weight="0.5" |
| 203 | + android:onClick="onGoToSydney" |
203 | 204 | android:text="@string/go_to_sydney" /> |
204 | 205 |
|
205 | 206 | <com.google.android.material.button.MaterialButton |
206 | 207 | android:id="@+id/bondi" |
207 | 208 | android:layout_width="0dp" |
208 | 209 | android:layout_height="wrap_content" |
209 | | - android:onClick="onGoToBondi" |
210 | 210 | android:layout_weight="0.5" |
| 211 | + android:onClick="onGoToBondi" |
211 | 212 | android:text="@string/go_to_bondi" /> |
212 | 213 | </LinearLayout> |
213 | 214 |
|
|
0 commit comments