case expressions must be constant expressions

private OnClickListener onClicker = new OnClickListener() {
@Override
public void onClick(View v) {
switch (v.getId()) {
 
case R.id.btn_admission:
btn_admission.setTextColor(Color.parseColor("#4279DC"));
btn_appearance.setTextColor(Color.WHITE);
btn_admission
.setBackgroundResource(R.drawable.baike_btn_pink_left_f_96);
btn_appearance
.setBackgroundResource(R.drawable.baike_btn_trans_right_f_96);
switchFragment(MESSAGE_FRAGMENT_TYPE);


break;
case R.id.btn_appearance:


btn_admission.setTextColor(Color.WHITE);
btn_appearance.setTextColor(Color.parseColor("#4279DC"));
btn_admission
.setBackgroundResource(R.drawable.baike_btn_trans_left_f_96);
btn_appearance
.setBackgroundResource(R.drawable.baike_btn_pink_right_f_96);
switchFragment(CALL_FRAGMENT_TYPE);


break;


}
}

};



提示    case expressions must be constant expressions 


导入support-v7的时候  勾选了isLibrary  的原因


case expressions must be constant expressions_第1张图片

你可能感兴趣的:(case expressions must be constant expressions)