-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
SafeArea on Android with notch #6795
Comments
Hi @markosole, |
Hi @tsonevn thanks for reply. |
Hi @markosole, Also, I will try again to recreate the issue. |
Hi @tsonevn ,
And then import it on each page:
Someone may find this useful. There is still no out of the box solution for android P / Pixel 3 UPDATE: |
Hi @markosole, About the workaround that you have suggested I tested it with my sample project, however, it doesn't seem to work. Maybe I am missing something. Can you check the attached project? I set up the |
Hi @tsonevn, I have recreated it without problem in app you sent. Just add any css style to app-root.js and it bill break things apart.
When ever I add or try to manipulate with any CSS over |
fyi - just got a customer report: he's experiencing the same issue on Samsung S10 where the camera "hole" (so not a notch in the "classic" sense) effective blocks UI elements. UPDATE: just found that Android SDK >= 28 provides an API to check for "display cutouts" so I suppose this scenario could be solved generally by the {N} android runtime |
Hi all, thanks for info. I have seen few apps having problems with height and notch (not nativescript apps). MI Fit for example and few others. I think that this support should be added and controlled in some sort of settings. I am using CSS to fix the problem, but who knows what to expect with other phones. |
For anyone having this issue and using Angular and RadSideDrawer, I was able to get it to adjust for the notch without changing every page (I think): Assuming RadSideDrawer is at root of app: In app.component.ts:
In app.component.html where you insert page router outlet:
........... In app.component.css: |
This comment was marked as abuse.
This comment was marked as abuse.
Thanks so much @NathanaelA for your response. Switched over to your plugin to detect notch - working great. Thanks again. |
@CaptainDingle you're a life saver man ! |
This solved my problem, this should be included in the SideDrawer README... |
@programista25, This thing works. However I wonder why this isn't included by default with the templates? I don't think so. N Baua |
This comment was marked as abuse.
This comment was marked as abuse.
To anyone else who is trying to add this, make sure you're putting this in values-v21 as this requires a minimum of Android 21 and up! |
Hi to all,
I am using latest NativeScript with Sidekick:
Version: 1.14.1-v.2018.11.23.3 (latest)
NativeScript CLI version: 5.1.0
CLI extension nativescript-cloud version: 1.15.0
CLI extension nativescript-starter-kits version: 0.3.5
I have a problem with Android (Pixel 3 XL, android P) where phones notch cuts into ActionBar.
Application is Drawer Navigation application which comes with Native Script (built in).
Check attached preview. You can not see the notch but it cuts over "Home" action bar title.
I have tried with CSS top margin 50 but then it will effect other phones which does not have notch or notch height is different.
Is there a proper way to deal with this?
I could not find any solution. I think that NativeScript should be able to handle this by default, but it does not.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: