Skip to content

Instantly share code, notes, and snippets.

@junojisan
Last active August 29, 2015 13:59
Show Gist options
  • Save junojisan/10534988 to your computer and use it in GitHub Desktop.
Save junojisan/10534988 to your computer and use it in GitHub Desktop.
ログインボタン押下のイベント
@Override
public void onClick(View v) {
// ユーザIDの取得
EditText etUsername = (EditText)findViewById(R.id.et_username);
String username = etUsername.getText().toString();
// パスワードの取得
EditText etPassword = (EditText)findViewById(R.id.et_password);
String password = etPassword.getText().toString();
Bundle args = new Bundle();
args.putString("USER_NAME", username);
args.putString("PASSWORD", password);
// ログイン処理を非同期で行うためLoaderを開始
getLoaderManager().restartLoader(0, args, LoginActivity.this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment