react-native-image-viewer icon indicating copy to clipboard operation
react-native-image-viewer copied to clipboard

How to change the color position of the top page number

Open housan-eng opened this issue 6 years ago • 4 comments

How to change the color position of the top page number

housan-eng avatar Jan 07 '20 07:01 housan-eng

same issue

nikhil3010 avatar Jan 15 '20 09:01 nikhil3010

+1

desarrollospyro avatar Jan 21 '20 13:01 desarrollospyro

+1

MtWay avatar Apr 26 '20 11:04 MtWay

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

MohammadAzimi avatar Jun 30 '21 05:06 MohammadAzimi