
android如何获取textview的背景色
展开全部
Drawable dd=TextView.getBackground();
追问
然后怎样获取背景颜色值呢?
追答
Drawable dd = tv.getBackground();//获取背景图片
/********************************************/
ColorDrawable colorDrawable= (ColorDrawable) tv.getBackground();//获取背景颜色
colorDrawable.getColor();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |