SafeArea on Android with notch

未关闭
#6,795 21 条评论 9 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
android
领域
mobile-dev

调研方向

在运行 Android P 的 Pixel 3 XL 上使用 NativeScript Drawer Navigation 应用复现该问题,然后首先跟踪 Android ActionBar 如何处理刘海和安全区域内边距。完成标准是 Home 标题不再与刘海重叠,同时在没有刘海或刘海高度不同的手机上保持正确定位。

由索引模型根据 Issue 内容生成。

描述

bug os: android

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.

image

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.

主要语言
TypeScript
星标
25.7k
派生
1.7k
平均合并
1 天 5 小时
30 天内合并 PR
35

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NativeScript/NativeScript 的其他 Issue

查看 NativeScript/NativeScript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。