meliorence / react-native-image-gallery

Pure JavaScript image gallery component for iOS and Android with high-performance and native feeling in mind
715 stars 298 forks source link

Exit button is not defined by default? #147

Closed mertct11 closed 4 years ago

mertct11 commented 4 years ago

I imported the gallery, it is very nice, it also works with the flatlist. the gallery doesn't close after opening, so the cross mark doesn't come up in default. How can I handle it? How do you get out of galery? I need your help. Thanks in advance!

thanx

my code sample :


        <Modal
          animationType="slide"
          transparent={true}
          visible={this.state.isVisibleImageViewer}
        >
    <Gallery
        style={{ flex: 1, backgroundColor: '#696969' }}
        initialPage={0}

        images={[{caption: this.state.tempPost.postText ,  source:{ uri : this.state.tempPost.postPhoto}}]}
      />
          </Modal>
NazimMertBilgi commented 3 years ago

@mertct11 buyur adaşım :)

get galleryCount() { const { index, images } = this.state; return ( <View style={{ top: 20, height: 65, backgroundColor: Colors.PURPLE, width: '100%', position: 'absolute' }}> <TouchableOpacity onPress={() => this.props.navigation.goBack()} style={{ position: 'absolute', left: 20, paddingLeft: "10%" }}> <Text style={{ color: 'white', fontSize: 18 }}>Kapat</Text> </TouchableOpacity> <Text style={{ position: 'absolute', right: 0, color: 'white', fontSize: 18, paddingRight: "10%" }}>{index + 1} / {images.length}</Text> </View> ); }