public void handleMessage(Message msg) { switch (msg.what) { case 1: Toast.makeText(ActLogin.this, strMessage, Toast.LENGTH_LONG).show(); Intent intent = new Intent(); if (lv.getIsNewRegister()) { intent.setClass(ActLogin.this, ActSearchUser.class); lv.setIsNewRegister(false); startActivity(intent); } // else { // intent.setClass(ActLogin.this, ActPerson.class); // } if (dlgProgress != null && dlgProgress.isShowing()) { dlgProgress.dismiss(); } lv.setIsNewLogin(true); ActLogin.this.finish(); break; case 2: if (dlgProgress != null && dlgProgress.isShowing()) { dlgProgress.dismiss(); } Toast.makeText(ActLogin.this, strMessage, Toast.LENGTH_LONG).show(); break; } }
private void init_data() { String str = ""; String strDesc = "忘记了" + "<font color='red'>" + "密码?" + "</font>"; txtFindPwd.setText(Html.fromHtml(strDesc)); str = lv.getLoginName(); txtName.setText(str.contains("@sinaweibo.com") ? "" : str); }
@Override public void onClick(View v) { Intent intent = null; switch (v.getId()) { case R.id.btnLogin: login(); break; case R.id.btnRegister: intent = new Intent(); intent.setClass(ActLogin.this, ActRegister.class); startActivityForResult(intent, 100); break; case R.id.btnLoginSina: intent = new Intent(); intent.setClass(ActLogin.this, ActWeiboGuide.class); startActivity(intent); lv.setIsWLogin(true); ActLogin.this.finish(); break; case R.id.btnLoginDouban: break; case R.id.btnLoginKaixin: break; case R.id.btnLoginRenren: break; case R.id.txtFindPwd: intent = new Intent(); intent.setClass(ActLogin.this, ActFindPwd.class); startActivity(intent); break; } }
public void handleMessage(Message msg) { switch (msg.what) { case 1: lv.setIsNewRegister(true); Toast.makeText(ActRegister.this, strMessage, Toast.LENGTH_LONG).show(); Intent i = new Intent(); ActRegister.this.setResult(RESULT_OK, i); ActRegister.this.finish(); if (dlgProgress != null && dlgProgress.isShowing()) { dlgProgress.dismiss(); } ActRegister.this.finish(); break; case 2: if (dlgProgress != null && dlgProgress.isShowing()) { dlgProgress.dismiss(); } Toast.makeText(ActRegister.this, strMessage, Toast.LENGTH_LONG).show(); break; } }