Commit e1ee959
[DatePicker] Fix edge-to-edge mode being applied multiple times
When the date picker goes back from background to foreground, the onStart() method will be called and make enableEdgeToEdge() be called again. This will make it incorrectly use the header height and top padding already adjusted with system inset as the original height and padding, and thus add the inset multiple times.
Creates a flag to only enable edge-to-edge once to fix the issue.
Resolves #2628
PiperOrigin-RevId: 440110562
(cherry picked from commit c6a654c)1 parent bed5c59 commit e1ee959
File tree
1 file changed
+9
-2
lines changed- lib/java/com/google/android/material/datepicker
1 file changed
+9
-2
lines changedLines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
307 | 309 | | |
308 | 310 | | |
309 | 311 | | |
310 | | - | |
| 312 | + | |
311 | 313 | | |
312 | 314 | | |
313 | 315 | | |
| |||
356 | 358 | | |
357 | 359 | | |
358 | 360 | | |
359 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
360 | 366 | | |
361 | 367 | | |
362 | 368 | | |
| |||
380 | 386 | | |
381 | 387 | | |
382 | 388 | | |
| 389 | + | |
383 | 390 | | |
384 | 391 | | |
385 | 392 | | |
| |||
0 commit comments