Android LinearGradient XML

后端 未结 4 1943
时光说笑
时光说笑 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:53

    You need to do this in Java code. ShapeDrawable1.java from API Demos has an example.

    Shape Drawable details what is available in xml.

提交回复
热议问题