RelativeLayout dls_layout = (RelativeLayout) view.findViewById(R.id.dls_layout);
if (userInfo != null&&"0".equals(userInfo.getIscandls())) {
dls_layout.setClickable(true);
dls_layout.setOnClickListener(this);
}else{
dls_layout.setClickable(false);
// dls_layout.setBackgroundColor(R.color.main_color);//不可用
dls_layout.setBackgroundColor(getResources().getColor(R.color.unclickablegray));
}
if (userInfo != null&&"0".equals(userInfo.getIscandls())) {
dls_layout.setClickable(true);
dls_layout.setOnClickListener(this);
}else{
dls_layout.setClickable(false);
// dls_layout.setBackgroundColor(R.color.main_color);//不可用
dls_layout.setBackgroundColor(getResources().getColor(R.color.unclickablegray));
}