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); }
相关文章推荐
- 代码设置TextView、Button等控件圆角边框背景颜色
- 通过选择器selector给TextView,Button设置字体颜色和背景颜色
- Android给TextView设置透明背景、圆角边框
- (转)#小美化#Android给TextView设置透明背景、圆角边框
- Android给TextView设置透明背景、圆角边框
- [转]怎么把一个textview的背景图片设置成圆角的?
- Android中TextView显示圆圈背景或设置圆角的方法
- Android给TextView设置透明背景、圆角边框
- Android给TextView设置透明背景、圆角边框
- Android给TextView设置透明背景、圆角边框
- Android给TextView和EditText等控件设置透明背景、圆角边框
- Android通过selector选择器设置Button或者textview的背景颜色,字体颜色
- android Button,textView 等控件设置控件内嵌周围图片使用方法
- LinearLayout通过shape设置圆角,但是最下面的textView却没有圆角
- 最新历史版本 :android--设置TextView部分文字的颜色和背景(高亮显示)
- Android代码生成TextView,Button,CheckBox等控件的设置技巧
- [Android开发] 代码code设置9.png/9-patch 图片背景后,此view中的TextView等控件显示不正常(常见于listview中)
- 设置TextView控件的背景透明度和字体透明度
- Android TextView文字设置超链接、背景高亮、关键字高亮等用法
- Android笔记(4)TextView/Button/ImageView的圆角矩形/圆形控件