代码里面设置颜色

  this.getResources().getColor(R.color.Login_title_bar) 

 用法:

1   title.setTextColor(this.getResources().getColor(R.color.white));
2   layout.setBackgroundColor(this.getResources().getColor(R.color.Login_title_bar)); 

代码里面设置背景图片

1 this.getResources().getDrawable(R.drawable.download_button)

用法

1 holder.mRoundProgressBar.setBackground(context.getResources().getDrawable(R.drawable.download_button));

 

posted on 2015-08-06 17:07  南巷挽清风  阅读(568)  评论(0编辑  收藏  举报