Android LinearGradient XML

后端 未结 4 1942
时光说笑
时光说笑 2021-02-03 20:27

I\'m facing a small problem with the LinearGradient definition in XML. What I want is to use the constructor that accepts the array of colors and the array of positions.

<
4条回答
  •  情歌与酒
    2021-02-03 20:55

    @Juriy, @ErickPetru:

    +1 for ErickPetru's answer. Although I'd like to mention that there is one more feature available: One cannot only specify the centerColor, but also a center offset, which allows for some more flexibility and sometimes helps to avoid the necessity for Java coding.

    
    
        
        
    
    

提交回复
热议问题