React-native-image-viewer: Change render indicator color

Created on 28 Nov 2019  路  1Comment  路  Source: ascoders/react-native-image-viewer

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 !!

Most helpful comment

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> )}

>All comments

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> )}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NdozHH picture NdozHH  路  4Comments

Dontag picture Dontag  路  4Comments

herarya picture herarya  路  6Comments

darrenchiu picture darrenchiu  路  9Comments

javfel94 picture javfel94  路  3Comments