ascoders / react-native-image-viewer

🚀 tiny & fast lib for react native image viewer pan and zoom
MIT License
2.44k stars 578 forks source link

Change render indicator color #372

Open cherif2405 opened 4 years ago

cherif2405 commented 4 years ago

I would like to change the indicator color but i don't know how to do so. i try to change the renderIndicator by doing this.

(currentIndex, allSize) => <Text style={{color:'red'}}>currentIndex + "/" + allSize</Text> but it doesn't even show.

Please help !!

ngochai117 commented 4 years ago

I would like to change the indicator color but i don't know how to do so. i try to change the renderIndicator by doing this.

(currentIndex, allSize) => <Text style={{color:'red'}}>currentIndex + "/" + allSize</Text> but it doesn't even show.

Please help !!

add style position: 'absolute' -> important

renderIndicator={(currentIndex, allSize) => ( <Text style={{ alignSelf: 'center', position: 'absolute', top: 10 }}> {currentIndex + '/' + allSize} </Text> )}