React-native-image-viewer: How to loading render center

Created on 1 Feb 2018  路  6Comments  路  Source: ascoders/react-native-image-viewer

hi @ascoders how to set loadingRender to center position,

Most helpful comment

This works for me:

loadingRender={() => (
    <ActivityIndicator
      color={colors.defaultPrimaryColor}
      size="large"
      style={{
        height: Dimensions.get('window').height,
        alignItems: 'center',
        justifyContent: 'center',
      }}
    />
)}

All 6 comments

@herarya I fixed like this
image

@yazhengwang thanks, i follow you code, loader indicator still on top position / header bar

@herarya within a View with justifyContent: 'center' and alignItems: 'center'

@herarya how to solved it?

This works for me:

loadingRender={() => (
    <ActivityIndicator
      color={colors.defaultPrimaryColor}
      size="large"
      style={{
        height: Dimensions.get('window').height,
        alignItems: 'center',
        justifyContent: 'center',
      }}
    />
)}

It looks like the problem has been solved.

Was this page helpful?
0 / 5 - 0 ratings