Commit 628dd8b
committed
Fix black bar on display cutout side in landscape
In landscape orientation, the display cutout moves to a long edge of
the screen. With windowLayoutInDisplayCutoutMode set to shortEdges,
the system prevents the window from extending into the cutout area on
long edges, leaving a black bar.
Two changes fix this:
1. Set windowLayoutInDisplayCutoutMode to "always" (API 30+) so the
window extends into the cutout area on all edges, not just short
ones.
2. Stop DrawerLayoutContainer from voluntarily avoiding the cutout:
remove displayCutout() from the inset types used to calculate
child margins and to draw black background rects. The content now
fills the full screen area including behind the cutout.1 parent 3581a10 commit 628dd8b
File tree
2 files changed
+4
-25
lines changed- TMessagesProj/src/main
- java/org/telegram/ui/ActionBar
- res/values-v31
2 files changed
+4
-25
lines changedLines changed: 2 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
40 | | - | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
75 | 72 | | |
76 | 73 | | |
77 | 74 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 75 | | |
83 | 76 | | |
84 | 77 | | |
| |||
203 | 196 | | |
204 | 197 | | |
205 | 198 | | |
206 | | - | |
207 | | - | |
| 199 | + | |
208 | 200 | | |
209 | 201 | | |
210 | 202 | | |
| |||
216 | 208 | | |
217 | 209 | | |
218 | 210 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | 211 | | |
232 | 212 | | |
233 | 213 | | |
| |||
270 | 250 | | |
271 | 251 | | |
272 | 252 | | |
273 | | - | |
274 | | - | |
| 253 | + | |
275 | 254 | | |
276 | 255 | | |
277 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
0 commit comments