react-native-image-viewer
react-native-image-viewer copied to clipboard
How to change the color position of the top page number
How to change the color position of the top page number
same issue
+1
+1
I did it by renderIndicator prop like this
renderIndicator={(currentShowIndex, total)=> <Indicator {...{currentShowIndex, total}}/>}
and this is my Indicator component with my own styles
const Indicator = ({currentShowIndex, total}) => {
return (
<View style={styles.container}>
<Text style={styles.text}>{`${currentShowIndex} / ${total}`}</Text>
</View>
)
}
const styles = StyleSheet.create({
container: {
position: 'absolute', // <-- absolute postion is important and needed
alignSelf: 'center',
marginTop: 32,
},
text: {
color: Colors.White,
fontSize: 20,
fontFamily: Fonts.Bold
}
})
And here https://github.com/ascoders/react-native-image-viewer/issues/372#issuecomment-647103609