android button 代码设置背景色
来源:互联网 发布:windows怎么禁止ping 编辑:程序博客网 时间:2024/06/02 13:13
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.ColorDrawable;
private Drawable drawable_backup;
drawable_backup = pauseBtn.getBackground();
//获取背景,备份起来
pauseBtn.setBackgroundColor(Color.parseColor("#808080"));
//改变按钮的背景色
pauseBtn.setOnClickListener(this);
//
pauseBtn.setClickable(false);
//禁止点击
......
......
......
......
pauseBtn.setClickable(true);
//满足条件,使能点击
pauseBtn.setBackgroundDrawable(drawable_backup);
//还原背景色
0 0
- android button 代码设置背景色
- button点击设置背景色
- android,java代码设置背景色
- android设置背景色为透明,Button控件透明
- Android button设置背景色与边框颜色
- android button 透明背景色
- Android改变button背景色与获取button背景色
- Android背景色设置
- Android设置背景色
- Button形状和背景色的设置
- android 在代码中使用 #ffffff 模式 设置背景色
- android 在代码中使用 #ffffff 模式 设置背景色
- android studio 如何设置代码区域的背景色
- android 动态设置actionbar背景色(代码修改)
- android selector color button 背景色
- Android自定义Button背景色,弧度
- Android Studio 设置背景色
- android 设置渐变背景色
- Android 定时器+倒计时 CountDownTimer实现
- angular路由详解
- JAVA设计模式之适配器模式
- Unity3d vuforia增强现实(AR)
- 第九届“中兴·图灵杯”人工智能程序设计大赛圆满落幕
- android button 代码设置背景色
- 最大类间差法(otsu)
- 网页设计代码
- caffe将用训练好的caffemodel和train_val.prototxt文件分类新的一张图片-下篇--caffe学习(7)
- 基因算法解析、设计,以解决背包问题和旅行商问题为例
- 论文阅读(一)
- App测试中ios和Android的区别
- 函数参数的传值方式
- 1079. Total Sales of Supply Chain (25)