react-native-img-cache icon indicating copy to clipboard operation
react-native-img-cache copied to clipboard

defaultSource prop not working

Open sudugo opened this issue 8 years ago • 4 comments

for profile page in my app i pass a default empty profile prop as follows <CachedImage source={imageSrc} style={styles.profileImage} defaultSource={theme.emptyProfile} /> my empty profile image does not show when its loading the real uri image. is this behaviour right or should i use customImageComponent?

before first load of uri image, nothing gets shown. after that if the image uri changes , the default source is shown correctly. as nothing is shown during the first load my view gets broken and it pops when image gets loaded. any help would be appreciated.

when loading for first time...see how no default image is not shown screenshot_2017-06-21-03-04-43 after first load screenshot_2017-06-21-03-04-46 when i fetch second time default prop is shown correctly screenshot_2017-06-21-03-05-16

sudugo avatar Jun 20 '17 21:06 sudugo

Obviously your test phone is an android device, but defaultSource prop doesn't work on android platform. So you can try it again on an IOS device

NikiLee2016 avatar Aug 11 '17 05:08 NikiLee2016

Any option to get it working on Android?

sood03 avatar Aug 27 '17 11:08 sood03

while loading image image size =0

wangshuwen1107 avatar Apr 20 '18 02:04 wangshuwen1107

Beacuse defaultSource only ios useful

在 2018年4月20日,下午1:24,William Candillon <[email protected]mailto:[email protected]> 写道:

Why not using the default source as a the preview?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/wcandillon/react-native-img-cache/issues/56#issuecomment-382980752, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWCzi9k5GKxVF_cgSvXGp69fnkKUi1TSks5tqXDygaJpZM4OALQI.

wangshuwen1107 avatar Apr 20 '18 09:04 wangshuwen1107