xref: /MusicFree/src/components/base/listLoading.tsx (revision e650bfb34226e2a09d15cbf7832c4805a87cd60e)
1import React from 'react';
2import {ActivityIndicator, StyleSheet, View} from 'react-native';
3import rpx from '@/utils/rpx';
4import {fontSizeConst} from '@/constants/uiConst';
5import ThemeText from './themeText';
6import useColors from '@/hooks/useColors';
7
8export default function ListLoading() {
9    const colors = useColors();
10
11    return (
12        <View style={style.wrapper}>
13            <ActivityIndicator
14                animating
15                color={colors.text}
16                size={fontSizeConst.appbar}
17            />
18            <ThemeText style={style.loadingText}>加载中...</ThemeText>
19        </View>
20    );
21}
22
23const style = StyleSheet.create({
24    wrapper: {
25        width: '100%',
26        height: rpx(140),
27        justifyContent: 'center',
28        alignItems: 'center',
29    },
30    loadingText: {
31        marginTop: fontSizeConst.content * 1.2,
32    },
33});
34