【发布时间】:2019-04-18 07:23:09
【问题描述】:
我正在使用 react-native-splash-screen 库向我的 react 本机应用程序添加启动画面。
根据文档,对于 Android,我们需要在 app/src/main/res/layout 中创建一个名为 launch_screen.xml 的文件,其内容如下:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/launch_screen" android:scaleType="centerCrop" />
</RelativeLayout>
我们只能将方向设置为垂直或水平。我想有一个单独的垂直和水平启动画面。上面的文件只允许单个 RelativeLayout 元素。
我有什么遗漏吗?
提前致谢!
【问题讨论】:
标签: android react-native splash-screen