GradientDrawable 可以用来通过程序方式给控件设置背景如圆角,边框等
来源:互联网 发布:centos7.0安装nginx 编辑:程序博客网 时间:2024/05/19 00:55
@SuppressLint("NewApi")public void setPopupStyle(final int backgroundColor, final int borderColor, final int borderWidthDP, float cornerRadiusDP, final int textColor) { final GradientDrawable popupbackground = new GradientDrawable(); popupbackground.setCornerRadius(cornerRadiusDP * density); popupbackground.setStroke((int) (borderWidthDP * density), borderColor); popupbackground.setColor(backgroundColor); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) scrollIndicatorTextView.setBackgroundDrawable(popupbackground); else scrollIndicatorTextView.setBackground(popupbackground); scrollIndicatorTextView.setTextColor(textColor);}
0 0
- GradientDrawable 可以用来通过程序方式给控件设置背景如圆角,边框等
- 关于给TextView等控件设置背景选择器
- WM_CTLCOLOR消息用来完成对EDIT, STATIC, BUTTON等控件设置背景和字体颜色
- 代码设置TextView、Button等控件圆角边框背景颜色
- Android 代码设置TextView、Button等控件圆角边框背景颜色
- 给控件设置背景颜色
- 通过shape给控件添加边框
- Android通过xml给控件添加边框
- Android给TextView,EditText等设置边框
- Android给TextView,EditText等设置边框
- GradientDrawable 动态设置背景的使用
- MFC以拼接的方式设置程序的背景,控件背景设置为透明。
- Android—给控件设置边框
- 通过GradientDrawable设置或修改view background
- android shape实现控件圆角,背景,边框等属性
- Android给TextView设置透明背景、圆角边框
- Android给TextView设置透明背景、圆角边框
- Android 给控件设置带阴影背景
- [USACO1.5]数字金字塔 Number Triangles
- caffe在ubuntu16.04配置流程
- 隐藏标题栏和底部操作栏,可上下滑动显示
- String StringBuffer StringBuilder 区别整理
- MapReduce:详解Shuffle过程
- GradientDrawable 可以用来通过程序方式给控件设置背景如圆角,边框等
- (4)Hadoop 添加和删除数据节点
- ansible安装配置
- 数据库隔离级别的本质解释
- [SD2014集训]查询(分块+数学相关)
- SQLite基本使用
- Shiro实战(二)
- ajax跨域请求小结
- mvc请求过程总结