public static GradientDrawable create(@ColorInt int startColor, @ColorInt int endColor, int radius,
@FloatRange(from = 0f, to = 1f) float centerX,
@FloatRange(from = 0f, to = 1f) float centerY) {
GradientDrawable gradientDrawable = new GradientDrawable();
gradientDrawable.setColors(new int[]{
startColor,
endColor
});
gradientDrawable.setGradientType(GradientDrawable.RADIAL_GRADIENT);
gradientDrawable.setGradientRadius(radius);
gradientDrawable.setGradientCenter(centerX, centerY);
return gradientDrawable;
}
GradientUtils.java 文件源码
java
阅读 45
收藏 0
点赞 0
评论 0
项目:music-player
作者:
评论列表
文章目录