您的位置:首页 > 其它

TextView Button 设置圆角背景

2017-11-24 18:37 429 查看
/**
*
* @param tvGmTimeType
* @param textBackColor
* @param roundRadius 圆角半径
*/
public static void setTextBackColor(TextView tvGmTimeType, int textBackColor, int roundRadius) {
//		int roundRadius = 15; // 8dp
//		int fillColor = Color.parseColor();//内部填充颜色
GradientDrawable gd = new GradientDrawable();//创建drawable
gd.setColor(textBackColor);
gd.setCornerRadius(roundRadius);

tvGmTimeType.setBackgroundDrawable(gd);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: