You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on an Android app using Bevy and am having trouble getting the are of the screen that I can render my app in. My phone has a camera cutout on top and soft buttons in the bottom area of the screen.
The area of the soft buttons is correctly given by (inner_size.height as f32 - content_rect.bottom as f32) / scale_factor as f32, but the top area is consistently reported as too big. One way to see this is to remove the WindowManagerFlags::LAYOUT_IN_SCREEN flag, which completely removes the possibility to render behind the camera/info bar. But content_rect still tells me I need to keep 56px on top empty (content Rect { left: 0, top: 147, right: 1080, bottom: 2047 } and scale 2.625). An even bigger distance from top gets reported when I change from portrait to landscape mode.
The following shows two buttons rendered according to the reported content rect at the top most and bottom most positions (I am ignoring left/right for now).
Screen_Recording_20230708-125921.mp4
The text was updated successfully, but these errors were encountered:
I am working on an Android app using Bevy and am having trouble getting the are of the screen that I can render my app in. My phone has a camera cutout on top and soft buttons in the bottom area of the screen.
The area of the soft buttons is correctly given by
(inner_size.height as f32 - content_rect.bottom as f32) / scale_factor as f32
, but the top area is consistently reported as too big. One way to see this is to remove theWindowManagerFlags::LAYOUT_IN_SCREEN
flag, which completely removes the possibility to render behind the camera/info bar. But content_rect still tells me I need to keep56px
on top empty (content Rect { left: 0, top: 147, right: 1080, bottom: 2047 } and scale 2.625
). An even bigger distance from top gets reported when I change from portrait to landscape mode.The following shows two buttons rendered according to the reported content rect at the top most and bottom most positions (I am ignoring left/right for now).
Screen_Recording_20230708-125921.mp4
The text was updated successfully, but these errors were encountered: