改变圆角按钮的颜色
2015-07-09 19:48
267 查看
当按钮使用shape.xml文件设置了圆角之后,如果直接在代码中使用setBackgroundColor(color),则会失去圆角效果
这种情况怎么解决呢
比如设置登录时的按钮:
这种情况怎么解决呢
比如设置登录时的按钮:
GradientDrawable myGrad = (GradientDrawable) login.getBackground(); myGrad.setColor(this.getResources().getColor(R.color.login_bg_click));
相关文章推荐
- 转载:Pixhawk源码笔记四:学习RC Input and Output
- 显示器
- LeapMotion系统概述
- Deep Learning(深度学习)学习笔记整理系列之(一)
- 转载:Pixhawk源码笔记三:串行接口UART和Console
- usb host controller
- SQL高性能查询优化
- 创建圆形头像和圆角图片
- LeetCode Contains Duplicate III
- 转载:Pixhawk源码笔记二:APM线程
- 学习英音的电影和电视剧
- python 多线程的一点东西
- TOMCAT起步内存溢出问题Exception in thread ""http-bio-8080"-exec-6&
- POJ 2586:Y2K Accounting Bug
- GB和GBDT 算法流程及分析
- 记在thinkPHP中一个创建模型的小错误
- POJ 2586:Y2K Accounting Bug
- java拾遗3----XML解析(三) StAX PULL解析
- 《自制编程语言》笔记:使用yacc与lex制作简单计算器
- C++ priority_queue