Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image 图像着色中的线性渐变_Image_React Native_Frontend_Linear Gradients - Fatal编程技术网

Image 图像着色中的线性渐变

Image 图像着色中的线性渐变,image,react-native,frontend,linear-gradients,Image,React Native,Frontend,Linear Gradients,我正在尝试对相关图像应用渐变颜色,但它不起作用。当tintColor在样式中时,当道具出现时,我尝试将其集成。如果有其他方法可以让它工作,请任何人帮忙,谢谢 import LinearGradient from 'react-native-linear-gradient' const grad = <LinearGradient colors={['#FFFF', '#3b5998', '#192f6a']} style={{position:'absolute'}}></

我正在尝试对相关图像应用渐变颜色,但它不起作用。当
tintColor
在样式中时,当道具出现时,我尝试将其集成。如果有其他方法可以让它工作,请任何人帮忙,谢谢

import LinearGradient from 'react-native-linear-gradient'

const grad = <LinearGradient colors={['#FFFF', '#3b5998', '#192f6a']} 
style={{position:'absolute'}}></LinearGradient>


class DocSelection extends React.Component{

    render(){

        return(
<View style={styles.container}>
<TouchableOpacity
            activeOpacity={0.7}
            onPress={() => {
                navigation.navigate("Account")
            }}
            style={ {position: 'absolute',
            width:  45,
            height: 45,
            alignItems: 'center',
            justifyContent: 'center',
            left: wp('5%'),
            top: hp('43%'),
            backgroundColor:'white',
            borderRadius: 45/2}}>
            <Image

              source={require("../Icons/account.png")}

              style={{ resizeMode: 'contain',
              width: 27.5,
              height: 27.5,


              }}
              tintColor= {grad}
            />

 </TouchableOpacity>

</View>

)}
从“反应本机线性渐变”导入线性渐变
常数梯度=
类DocSelection扩展了React.Component{
render(){
返回(
{
导航。导航(“帐户”)
}}
样式={{位置:'绝对',
宽度:45,
身高:45,
对齐项目:“居中”,
为内容辩护:“中心”,
左:可湿性粉剂('5%),
前几名:惠普(43%),
背景颜色:'白色',
边界半径:45/2}>
)}