Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6211

How to show overlay page using react native for iOS and android?

$
0
0

In my code, I am having two screens with two different class files. Here, I need to do screen one button click to show screen two. Screen two need to show like a overlay screen and if screen two button click then it should dissolve and back to screen one. how to achieve this?

sample screen enter image description here

below code I am using for click to call another page

<TouchableOpacity              onPress={() => {                this.setState({ isVisible: false });                this.props.navigation.navigate('screen2');              }}>

Screen two below code

render () {        const Screentwo = this.renderCarousel('test');        return (<SafeAreaView style={styles.safeArea}><View style={styles.container}><StatusBar                      translucent={true}                      backgroundColor={'rgba(0, 0, 0, 0.3)'}                      barStyle={'light-content'}                    /><ScrollView                      style={styles.scrollview}                      scrollEventThrottle={200}                      directionalLockEnabled={true}></ScrollView></View></SafeAreaView>        );    }

Viewing all articles
Browse latest Browse all 6211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>