コード例 #1
0
ファイル: PersonCenter.java プロジェクト: hyrtyp/ceistudy
 @Override
 public void onClick(View v) {
   super.onClick(v);
   switch (v.getId()) {
     case R.id.person_info:
       // 换底色
       person_info.setBackgroundResource(R.drawable.phone_study_tab_bg);
       qccount_info.setBackgroundResource(R.drawable.phone_study_tab_bg2);
       change_password.setBackgroundResource(R.drawable.phone_study_tab_bg2);
       // 换字
       person_info.setTextColor(getResources().getColor(R.color.phone_study_color_black));
       qccount_info.setTextColor(getResources().getColor(R.color.phone_study_color_White));
       change_password.setTextColor(getResources().getColor(R.color.phone_study_color_White));
       SwitchActivity(0);
       break;
     case R.id.qccount_info:
       person_info.setBackgroundResource(R.drawable.phone_study_tab_bg2);
       qccount_info.setBackgroundResource(R.drawable.phone_study_tab_bg);
       change_password.setBackgroundResource(R.drawable.phone_study_tab_bg2);
       // 换字
       person_info.setTextColor(getResources().getColor(R.color.phone_study_color_White));
       qccount_info.setTextColor(getResources().getColor(R.color.phone_study_color_black));
       change_password.setTextColor(getResources().getColor(R.color.phone_study_color_White));
       SwitchActivity(1);
       break;
     case R.id.change_password:
       person_info.setBackgroundResource(R.drawable.phone_study_tab_bg2);
       qccount_info.setBackgroundResource(R.drawable.phone_study_tab_bg2);
       change_password.setBackgroundResource(R.drawable.phone_study_tab_bg);
       // 换字
       person_info.setTextColor(getResources().getColor(R.color.phone_study_color_White));
       qccount_info.setTextColor(getResources().getColor(R.color.phone_study_color_White));
       change_password.setTextColor(getResources().getColor(R.color.phone_study_color_black));
       SwitchActivity(2);
       break;
   }
 }