移動ルートビューにビューにオーバーレイ表示と最後の子として追加してください:フルスクリーンをオーバーレイすることはできません。この例のように
<View>
<View style={styles.header}>
.....
</View>
<View style={styles.content}>
<Image style={styles.map}>
<View style={styles.overlay}>
<Image style={styles.people} />
<Image style={styles.destination} />
</View>
</Image>
</View>
</View>
。位置を絶対値に設定します。このようなもの
const styles= StyleSheet.create({
overlay:{
position: 'absolute',
top: 0,
bottom: 0,
left: 0,
right: 0,
backgroundColor: 'rgba(0,0,0,0.2)'
});
<View>
<View style={styles.header}>
.....
</View>
<View style={styles.content}>
<Image style={styles.map}>
</Image>
</View>
<View style={styles.overlay}>
<Image style={styles.people} />
<Image style={styles.destination} />
</View>
</View>
別のビューの上にもう1つのビューを追加しますか?この場合、反応ネイティブのモーダルを使用することができます。詳細については、 'この[react-native modal]を確認してください(https://facebook.github.io/react- native/docs/modal.html) –
この例のような全画面をオーバーレイすることはできません:https://rnplay.org/apps/wHCi_A –
反応ネイティブモーダルを使用すると、どのようにアイテムを残すことができますか? false –