/**被按下时的背景*/
public static Drawable createCornerBgPressed(Context c) {
SizeHelper.prepare(c);
// prepare
int strokeWidth = SizeHelper.fromPxWidth(1);
int roundRadius = SizeHelper.fromPxWidth(6);
int strokeColor = Color.parseColor("#ffc9c9cb");
int fillColor = Color.parseColor("#afc9c9cb");
GradientDrawable gd = new GradientDrawable();
gd.setColor(fillColor);
gd.setCornerRadius(roundRadius);
gd.setStroke(strokeWidth, strokeColor);
return gd;
}
DrawableHelper.java 文件源码
java
阅读 43
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录