码迷,mamicode.com
首页 > 其他好文 > 详细

setBackgroundDrawable和setBackgroundColor的用法

时间:2014-10-24 16:24:22      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   ar   sp   div   on   art   log   

 

   

1.设置背景图片,图片来源于drawable;

flightInfoPanel.setBackgroundDrawable(getResources().getDrawable(R.drawable.search_label_click));

2.转换字符串为int(颜色);

listItemView.deleteFilghtBg.setBackgroundColor(Color.parseColor("#F5F5DC"));

setBackgroundDrawable和setBackgroundColor的用法

标签:style   blog   color   ar   sp   div   on   art   log   

原文地址:http://www.cnblogs.com/xgjblog/p/4048368.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!