NativeScript / NativeScript/NativeScript
SafeArea on Android with notch
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- TypeScript
- Estrelas
- 25.7k
- Forks
- 1.7k
- Merge médio
- 1d 5h
- PRs com merge (30d)
- 35
Descrição
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.
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Reproduza o problema em um Pixel 3 XL executando Android P com o aplicativo NativeScript Drawer Navigation e, em seguida, comece rastreando como o Android ActionBar lida com o notch e os insets da área segura. O trabalho estará concluído quando o título Home não se sobrepuser mais ao notch, preservando o posicionamento correto em telefones sem notch ou com alturas de notch diferentes.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- android
- Domínio
- mobile-dev
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100