setBackgroundDrawable和setBackgroundColor的用法

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

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

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

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

posted @   浪里小白龙呼呼呼  阅读(4575)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示