Skip to content
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

Modal 在 android 上的无法全屏 #861

Open
laogui opened this issue May 10, 2024 · 3 comments
Open

Modal 在 android 上的无法全屏 #861

laogui opened this issue May 10, 2024 · 3 comments

Comments

@laogui
Copy link

laogui commented May 10, 2024

导致所有使用了modal的Picker组件遮罩都无法全屏,遮罩是黑色的,statusbar是白色的,体验不太好

@chj-damon
Copy link
Contributor

这个问题在所有的安卓手机上都存在。目前确实没找到好的办法解决。

@houjinyun
Copy link

这个问题,可以这样解决:

  1. 找到对应 react-native 源码里原生实现部分;
  2. 将其复制到 android 原生工程里,修改对应Dialog 弹窗的地方,将其改成全屏弹窗;
  3. 修改本地Modal原生组件名称,同时复制rn js 源码里 Modal 源码,iOS 不变,Android 的Modal 引用本地修改过的Modal组件;
  4. 可以写个 postinstall 脚本,每次 install 之后,将本地的 Modal 组件定义部分覆盖 node_modules 里对应的地方;

这样改过之后,业务代码里啥也不用懂,无侵入式修改完毕。

@chj-damon
Copy link
Contributor

这有点麻烦了。。。

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

No branches or pull requests

3 participants