shape 属性介绍
可以通过设置 angle 来自定义渐变方向,它是从左向右、逆时针转的。
当 angle 设置为0度时 :
当angle设置为90度时:
注意:设置的值以45度为一个单位。
radial样式的效果图:
资源文件
layout/activity_main.xml
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.jkxy.cu