چطور از loading animation در پروژه react native مان استفاده کنیم؟
- نفیسه افقی 1 سال قبل سوال کرد
- آخرین ویرایش 1 سال قبل
- شما باید برای ارسال دیدگاه وارد شوید
خود react native کتابخانه ای بنام ActivityIndicator دارد که می توانید از آن استفاده کنید. بصورت زیر اسفاده کنید:
import React from 'react';
import {ActivityIndicator, StyleSheet, View} from 'react-native';
const App = () => (
<View style={[styles.container, styles.horizontal]}>
<ActivityIndicator />
<ActivityIndicator size="large" />
<ActivityIndicator size="small" color="#0000ff" />
<ActivityIndicator size="large" color="#00ff00" />
</View>
);
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
},
horizontal: {
flexDirection: 'row',
justifyContent: 'space-around',
padding: 10,
},
});
export default App;
- نفیسه افقی 1 سال قبل پاسخ داد
- آخرین ویرایش 1 سال قبل
- شما باید برای ارسال دیدگاه وارد شوید