Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Get iOS status bar height #243

Open
javasuns opened this issue Mar 2, 2021 · 1 comment · May be fixed by #335
Open

Get iOS status bar height #243

javasuns opened this issue Mar 2, 2021 · 1 comment · May be fixed by #335

Comments

@javasuns
Copy link

javasuns commented Mar 2, 2021

Need a method to get status bar height.

Screenshot 2021-03-02 at 17 10 45

@javasuns javasuns linked a pull request Oct 8, 2022 that will close this issue
@LordTylus
Copy link

LordTylus commented Aug 28, 2023

This Issue apparently solves exactly a requirement we have, since we somewhat try to figure out how to properly support the notch of a device.

We can ask the display if it does have a notch. But since there's centered content, we have to find out how far we have to move it down in order to look good.

Is there a chance, the PR - which is open for almost a year already - can be merged, and the missing Android implementation provided?

I know you can request the statusbar height from android via the following code:

        Resources resources = activity.getResources();

        int statusbarHeightResourceId = resources.getIdentifier("status_bar_height", "dimen", "android");

        if (statusbarHeightResourceId > 0)
            return resources.getDimensionPixelSize(statusBarHeightResourceId);

        return 0;

However, I don't know what I would have to do in order to properly test if it works with Gluon. I know in my native Android App it does. I Ill also add this snipped to the PR as comment.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants