Commit 683b21d
authored
fix: support devices with cutouts for DataDrivenDatasetStylingActivity.java demo (googlemaps-samples#1979)
* fix: support devices with cutouts for DataDrivenDatasetStylingActivity.java demo
* fix: remove unnecessary 'res/' from paths in README.md file
* feat(apidemos): enhance DataDrivenBoundariesActivity UI and boundary selection
This commit enhances the DataDrivenBoundariesActivity demo with UI and
functionality improvements focusing on boundary type selection and visual
enhancements.
- Implements Material Design theming and UI elements.
- Adds boundary type selection via PopupMenu (Locality, Admin Area, Country).
- Refactors styling and implements persistent country selection.
- Handles system UI insets for improved display.
These changes improve the demo's user experience and code structure,
better showcasing data-driven boundary styling.
* feat(apidemos): configure dataset-specific zoom levels for datasets demo
This commit introduces dataset-specific zoom levels to the DataDrivenDatasetStylingActivity, enhancing the user experience when switching between datasets.
- Adds a `zoomLevel` field to the `DataSet` class to store the desired zoom level for each dataset.
- Updates the `dataSets` array to include appropriate zoom levels for Boulder, New York, and Kyoto datasets.
- Modifies the `centerMapOnLocation` method to accept a `zoomLevel` parameter, allowing it to be dynamically set.
- Updates the `switchDataSet` method to utilize the `zoomLevel` from the selected `DataSet` when centering the map, ensuring the map zooms to the optimal level for each dataset.
- Removes the previously hardcoded `ZOOM_LEVEL` constant, as the zoom level is now dataset-dependent.
These changes ensure that when a user selects a dataset, the map automatically zooms to a relevant level for that specific dataset, improving clarity and usability of the demo.
Also adds missing copyright header.1 parent 45d85ac commit 683b21d
File tree
14 files changed
+474
-223
lines changed- ApiDemos
- java
- app
- src/main
- java/com/example/mapdemo
- res
- drawable
- layout
- values
- gradle
- kotlin/app/src/main/res/layout
- resources
14 files changed
+474
-223
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
Lines changed: 221 additions & 78 deletions
Large diffs are not rendered by default.
Lines changed: 41 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
| |||
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
98 | | - | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
| |||
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| 112 | + | |
107 | 113 | | |
108 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
109 | 122 | | |
110 | 123 | | |
111 | 124 | | |
| |||
115 | 128 | | |
116 | 129 | | |
117 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
118 | 143 | | |
119 | 144 | | |
120 | 145 | | |
| |||
142 | 167 | | |
143 | 168 | | |
144 | 169 | | |
145 | | - | |
| 170 | + | |
146 | 171 | | |
147 | 172 | | |
148 | 173 | | |
| |||
152 | 177 | | |
153 | 178 | | |
154 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
155 | 187 | | |
156 | 188 | | |
157 | 189 | | |
| |||
270 | 302 | | |
271 | 303 | | |
272 | 304 | | |
273 | | - | |
274 | | - | |
| 305 | + | |
| 306 | + | |
275 | 307 | | |
276 | 308 | | |
277 | 309 | | |
| |||
323 | 355 | | |
324 | 356 | | |
325 | 357 | | |
326 | | - | |
327 | | - | |
| 358 | + | |
| 359 | + | |
328 | 360 | | |
329 | 361 | | |
330 | 362 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Lines changed: 47 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | | - | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
22 | 38 | | |
23 | 39 | | |
24 | | - | |
25 | | - | |
| 40 | + | |
| 41 | + | |
26 | 42 | | |
27 | 43 | | |
28 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
29 | 49 | | |
30 | 50 | | |
31 | 51 | | |
| |||
34 | 54 | | |
35 | 55 | | |
36 | 56 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
40 | 63 | | |
41 | 64 | | |
42 | 65 | | |
43 | | - | |
| 66 | + | |
| 67 | + | |
44 | 68 | | |
45 | | - | |
| 69 | + | |
46 | 70 | | |
47 | 71 | | |
48 | 72 | | |
49 | | - | |
50 | | - | |
| 73 | + | |
| 74 | + | |
51 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
52 | 85 | | |
53 | | - | |
| 86 | + | |
Lines changed: 39 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
22 | 36 | | |
23 | 37 | | |
24 | | - | |
25 | | - | |
| 38 | + | |
| 39 | + | |
26 | 40 | | |
27 | 41 | | |
28 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
29 | 47 | | |
30 | | - | |
31 | 48 | | |
| 49 | + | |
32 | 50 | | |
33 | 51 | | |
34 | | - | |
35 | | - | |
36 | 52 | | |
37 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
38 | 57 | | |
39 | | - | |
| 58 | + | |
40 | 59 | | |
41 | 60 | | |
42 | 61 | | |
43 | | - | |
| 62 | + | |
| 63 | + | |
44 | 64 | | |
45 | | - | |
| 65 | + | |
46 | 66 | | |
47 | 67 | | |
48 | 68 | | |
49 | | - | |
| 69 | + | |
| 70 | + | |
50 | 71 | | |
51 | | - | |
| 72 | + | |
52 | 73 | | |
53 | 74 | | |
54 | 75 | | |
55 | | - | |
56 | | - | |
| 76 | + | |
| 77 | + | |
57 | 78 | | |
| 79 | + | |
58 | 80 | | |
59 | | - | |
| 81 | + | |
0 commit comments