Get height of “notch” so contents won't be cut off
up vote
1
down vote
favorite
How can I get the height of recent android phones' notch, preferably in pixels?
I have an implementation where an image MUST be at the top in full screen.
With the addition of a notch to recently released phones, this image will be cut out by the notch. My idea in mind is to get the notch height and add a margin above it dynamically to accomodate different notch sizes.
Any help or other approaches would be greatly appreciated, thanks in advance!
android
add a comment |
up vote
1
down vote
favorite
How can I get the height of recent android phones' notch, preferably in pixels?
I have an implementation where an image MUST be at the top in full screen.
With the addition of a notch to recently released phones, this image will be cut out by the notch. My idea in mind is to get the notch height and add a margin above it dynamically to accomodate different notch sizes.
Any help or other approaches would be greatly appreciated, thanks in advance!
android
It should be the same as the status bar height.
– TheWanderer
Nov 19 at 0:50
Native API for display cutout was only added in android Pie so it's not really useful right now.
– Pawel
Nov 19 at 0:53
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
How can I get the height of recent android phones' notch, preferably in pixels?
I have an implementation where an image MUST be at the top in full screen.
With the addition of a notch to recently released phones, this image will be cut out by the notch. My idea in mind is to get the notch height and add a margin above it dynamically to accomodate different notch sizes.
Any help or other approaches would be greatly appreciated, thanks in advance!
android
How can I get the height of recent android phones' notch, preferably in pixels?
I have an implementation where an image MUST be at the top in full screen.
With the addition of a notch to recently released phones, this image will be cut out by the notch. My idea in mind is to get the notch height and add a margin above it dynamically to accomodate different notch sizes.
Any help or other approaches would be greatly appreciated, thanks in advance!
android
android
asked Nov 19 at 0:36
memelord9001
61
61
It should be the same as the status bar height.
– TheWanderer
Nov 19 at 0:50
Native API for display cutout was only added in android Pie so it's not really useful right now.
– Pawel
Nov 19 at 0:53
add a comment |
It should be the same as the status bar height.
– TheWanderer
Nov 19 at 0:50
Native API for display cutout was only added in android Pie so it's not really useful right now.
– Pawel
Nov 19 at 0:53
It should be the same as the status bar height.
– TheWanderer
Nov 19 at 0:50
It should be the same as the status bar height.
– TheWanderer
Nov 19 at 0:50
Native API for display cutout was only added in android Pie so it's not really useful right now.
– Pawel
Nov 19 at 0:53
Native API for display cutout was only added in android Pie so it's not really useful right now.
– Pawel
Nov 19 at 0:53
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53366911%2fget-height-of-notch-so-contents-wont-be-cut-off%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It should be the same as the status bar height.
– TheWanderer
Nov 19 at 0:50
Native API for display cutout was only added in android Pie so it's not really useful right now.
– Pawel
Nov 19 at 0:53