Created
May 29, 2016 17:24
-
-
Save CrandellWS/ac79d3864a96344d204d869d64fd1922 to your computer and use it in GitHub Desktop.
Alert Dialog Cancel Activity to send onResume event.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.os.Bundle; | |
/** | |
* Created by William on 5/29/2016. | |
* | |
* new AlertDialog.Builder(this). | |
* | |
* use:(OnClickListener){setNegativeButton, setNeutralButton, setPositiveButton} | |
* | |
* new DialogInterface.OnClickListener() { | |
* @Override | |
* public void onClick(DialogInterface dialog, int which) { | |
* Intent starterIntent = new Intent(getApplicationContext(), DismissCancelDialogActivity.class); | |
* startActivity(starterIntent, null); | |
* } | |
* } | |
* | |
* ---- OR ---- | |
* | |
* new AlertDialog.Builder(this). | |
* setOnDismissListener(new OnDismissListener() { | |
* @Override | |
* public void onDismiss(final DialogInterface arg0) { | |
* Intent starterIntent = new Intent(getApplicationContext(), DismissCancelDialogActivity.class); | |
* startActivity(starterIntent, null); | |
* } | |
* }); | |
* | |
*/ | |
public class DismissCancelDialogActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
finish(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment