-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix & enable HW rotation on notched devices on P+ #288
Conversation
Turns out getMetrics/getSize takes care of the grunt work for us. (The updated methods in SDK 30 appear to follow a similar trend, too).
And keep stuff in alphabetical order
Ah. Knew it was too easy: this excluded the status bar area, too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you know getScreenSizeWithConstraints(activity)
only works on pre KitKat devices (apis 17 & 18) and it is completely deprecated in immersive mode (apis19+).
Since legacy APIs doesn't use HW rotation I think it is safe to ignore getScreenAvailableWidth
et al.
Note to self: nav bar, not status bar. |
Err, the only thing it does is using Speaking of, the SDK 30 variant has a code excerpt to do that manually, and it appears to be able to tell display cutouts apart from the nav bar ;). |
@NiLuJe: You're right. I was talking about our usage :P. As we always enable immersive mode in KitKat+ devices, we don't need But having that available doesn't hurt either. 👍 |
Looks simple enough (he said, hopefully ;p) :).
This change is