コード例 #1
0
 @Override
 protected void initView() {
   new TitleManager(AccountSecurityActivity.this, getString(R.string.account_security), 2)
       .getTitleRightView()
       .setVisibility(View.INVISIBLE);
   if (AppTools.PSWLV.equals("1")) psw_lv.setBackgroundResource(R.drawable.img_my_security_low);
   else if (AppTools.PSWLV.equals("2"))
     psw_lv.setBackgroundResource(R.drawable.img_my_security_middle);
   else if (AppTools.PSWLV.equals("3"))
     psw_lv.setBackgroundResource(R.drawable.img_my_security_high);
   else psw_lv.setBackground(null);
   if (AppTools.TEL.equals("")) {
     tel_txt.setTextColor(getResources().getColor(R.color.light_red));
     tel_txt.setText(getString(R.string.account_unbounded));
     binding_tel_layout.setOnClickListener(this);
   } else {
     tel_txt.setTextColor(getResources().getColor(R.color.lightgrey));
     tel_txt.setText(Toolkit.getPhoneUserName(AppTools.TEL));
   }
   if (AppTools.EMAIL.equals("")) {
     email_txt.setTextColor(getResources().getColor(R.color.light_red));
     email_txt.setText(getString(R.string.account_unbounded));
     binding_email_layout.setOnClickListener(this);
   } else {
     email_txt.setTextColor(getResources().getColor(R.color.lightgrey));
     email_txt.setText(Toolkit.getMailUserName(AppTools.EMAIL));
   }
 }
コード例 #2
0
ファイル: LoginActivity.java プロジェクト: chfly/android
 @Override
 public void onClick(View v) {
   switch (v.getId()) {
     case R.id.login_name_more_btn:
       // 账户选择
       if (!arrayNames.isEmpty()) {
         MyspinnerAdapter adapter = new MyspinnerAdapter(context, arrayNames);
         ShowWindowManager.showWindowByEditText(context, mLogin_name_edt, adapter, name_layout);
       }
       break;
     case R.id.register_btn:
       openActivity(RegisterActivity.class);
       break;
     case R.id.login_btn:
       DeviceManager.hideSoftInputMode(context, mLogin_btn);
       doLogin();
       break;
     case R.id.login_retrieve:
       openActivity(RetrieveActivity.class);
       break;
     case R.id.check_pwd:
       Toolkit.hideOrShowPWD(checkPwd, mLogin_pswd_edt);
       break;
     default:
       break;
   }
 }