Back to project page Apocalypse-Defense.
The source code is released under:
MIT License
If you think the Android project Apocalypse-Defense listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.apocalypsedefense.app; //w ww . j a va 2 s . c om import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.View; public class OverwriteExistingGameDialog extends Dialog { public OverwriteExistingGameDialog(Context context) { super(context); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.overwrite_existing_game_dialog); final OverwriteExistingGameDialog dialog = this; // Overwrite game handler - starts new game View overwriteButton = findViewById(R.id.overwrite_game); overwriteButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { dialog.dismiss(); Activity ownerActivity = getOwnerActivity(); Intent intent = new Intent(ownerActivity, NewGameSettingsActivity.class); ownerActivity.startActivity(intent); } }); // Keep game handler - dismisses dialog is all View keepGame = findViewById(R.id.keep_game); keepGame.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { dialog.dismiss(); } }); } }