1.设置背景图片,图片来源于drawable;
flightInfoPanel.setBackgroundDrawable(getResources().getDrawable(R.drawable.search_label_click));
2.转换字符串为int(颜色);
listItemView.deleteFilghtBg.setBackgroundColor(Color.parseColor("#F5F5DC"));
1.设置背景图片,图片来源于drawable;
flightInfoPanel.setBackgroundDrawable(getResources().getDrawable(R.drawable.search_label_click));
2.转换字符串为int(颜色);
listItemView.deleteFilghtBg.setBackgroundColor(Color.parseColor("#F5F5DC"));
https://www.bilibili.com/video/BV1k8411575T/?vd_source=d68ed178f151e80fea1e02efd205802c