我解决了这个问题。这是解决方案
import { Dimensions } from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
const { width: W } = Dimensions.get('window')
<LinearGradient
start={{ x: 0.8, y: 0.2 }}
end={{ x: 0.5, y: 1.0 }}
locations={[0.1, 0.9]}
colors={[colors.HEADER_GRADIENT_1, colors.HEADER_GRADIENT_2]}
style={{
height: 245,
width: W - 120,
left: 50,
backgroundColor: 'red',
top: -85,
borderRadius: 150,
transform: [{ scaleX: 3 }]
}}
>
<StatusBar translucent={true} backgroundColor={'transparent'} />
</LinearGradient>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句