'React Native: GIF is not animated
This is my Modal component:
export default function LoadingModal(props) {
const {visible} = props;
return (
<Modal transparent visible={visible}>
<View style={styles.modalView}>
<Image
style={styles.loadingGif}
source={require('../../asset/images/loading.gif')}
/>
</View>
</Modal>
);
}
Everything is working except the GIF is not animated.
I follow React native components for RN 0.65 and add
// For animated GIF support
implementation 'com.facebook.fresco:fresco:2.0.0'
implementation 'com.facebook.fresco:animated-gif:2.0.0'
into android/app/build.gradle at dependencies section but it's still not working,
cd android
./gradlew clean
cd ..
react-native run-android ( yarn android )
is not working, too.
I have no idea about it. So I wish that anyone can help me with this problem. Thanks so much.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
