react-native:ユーザーがコンポーネントに触れるのを防ぐために、現在の画面の最上位レイヤーにカバービューを追加します。react-native:ユーザーがコンポーネントに触れるのを防ぐ?
ユーザーが1つのコンポーネントに触れると、ユーザーのログインを判断する必要があります。ユーザーがログインしていない場合は、「まず登録してください」と警告し、Register
画面に移動する必要があります。私の問題は、ユーザーが任意のコンポーネントに触れるのを防ぐ方法です。ユーザーが同じコンポーネントに再び触れることができる場合、シミュレータはRegister
画面を複数回ナビゲートします。 react-native-easy-toast
を使用してヒントウィンドウを表示しています。 現在の画面の上部にカバレッジビューを追加するにはどうすればよいですか?ビューを追加してスタイルindex
'999'を設定しますが、動作しません。
const styles = StyleSheet.create({
container: {
backgroundColor: '#EBF0F2',
},
coverV: {
backgroundColor:'red',
width:width,
height:height,
zIndex:9999,
},
title: {
position: 'absolute',
top: 20,
flex: 1,
height: 42,
width: width,
opacity: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor:'transparent'
},
icons: {
flexDirection: 'row',
flexWrap: 'wrap',
backgroundColor: 'white',
}
});
return(
<ScrollView style={styles.container}>
<StatusBar backgroundColor="rgba(0,0,0,0)" barStyle="light-content" translucent={true}/>
<Banner resources={tempArray} itemTouchFun={this.bannerNavigateFunc}/>
<View style={styles.title}>
<Image source={require('../../img/tfind.png')}/>
</View>
<View style={styles.icons}>
<Icon source={require('../../img/doctspec.png')}
onPress={this.onDoctor.bind(this)}
title='Icon1' />
<Icon source={require('../../img/osmedical.png')}
onPress={this.onOSMed}
title='Icon2' />
<Icon source={require('../../img/newdrugs.png')}
onPress={this.onMedicineBook}
title='Icon3' />
<Icon source={require('../../img/reservation.png')}
onPress={this.onOSMed}
title='Icon4' />
</View>
{this.renderNewsTabs()}
{this.renderNews()}
<View style={styles.coverV} />
<Toast ref="toast" position='center' positionValue={200}
fadeInDuration={750} fadeOutDuration={1000} opacity={0.8} />
</ScrollView>
);}