【发布时间】:2019-02-25 12:24:35
【问题描述】:
我在我的 react native 项目中添加了一个启动画面,当我打开键盘时,一切正常,它会短暂地显示它后面的启动画面。 视频 : https://drive.google.com/open?id=14ahrc-dyYnNEYAAX3iMQVwqqV6fVo_xG
复制
在 drawable 中创建 background_splash.xml 并在其中包含此代码:
<?xml version="1.0" encoding="utf-8" ?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/primary"/>
</layer-list>
然后将其添加到styles.xml文件中
<item name="android:windowBackground">
@drawable/background_splash
</item>
预期行为
出现键盘时不应显示启动画面。
代码示例
一切都在 To Reproduce 选项卡中,您只需添加一个 TextInput 即可显示。
环境
React Native 环境信息: 系统: 操作系统:Windows 10 CPU:(4) x64 Intel(R) Xeon(R) CPU E5-1603 v4 @ 2.80GHz 内存:9.57 GB / 15.92 GB 二进制文件: npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
【问题讨论】:
标签: android react-native splash-screen