我必须对底部导航栏进行非常定制的设计。我在屏幕上使用ImageBackground,并且需要导航栏在其上方而不是下方进行绘制。
我想问题是在幕后使用的SafeAreaView
。如何删除?
编辑:我在Android上工作,我只是发现SafeAreaView仅在iOS上工作。所以也许我需要一种不同的方式来实现我的目标?
也许您使用了错误的SafeAreaView,因为您知道来自react-navigation的SafeAreaView使得React native具有SafeAreaView:
import { SafeAreaView } from 'react-navigation';
然后您可以使用prop forceInset来自定义填充,具体取决于您的情况,
或替代项
<SafeAreaView forceInset={{ top: 'always' }} style={{ backgroundColor: '#212121', flex: 1}}>
<View>
<Text>SafeAreaView - Implementation</Text>
</View>
关于react-navigation
SafeAreaView
的更多信息
也在这里还有react-navigation
SafeAreaView