Я очень новичок в разработке Android.
У меня есть это:
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(R.string.message_user_registered)
.setCancelable(false)
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
Intent intent =
new Intent(GameDescriptionActivity.this,
GameHomeActivity.class);
Bundle extraData = new Bundle();
extraData.putInt(Constants.GAME_ID, this.gameId);
startActivity(intent);
}
});
AlertDialog alert = builder.create();
alert.show();
Но эта строка не работает:
extraData.putInt(Constants.GAME_ID, this.gameId);
Я могунет доступа к this.gameId
.
Как я могу это исправить?
Спасибо.