Back to project page timestatistic.
The source code is released under:
GNU General Public License
If you think the Android project timestatistic 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 maximsblog.blogspot.com.timestatistic; //www . j a v a 2 s. c o m import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; import android.support.v4.app.DialogFragment; public class AreYouSureResetAllDialogFragment extends DialogFragment { private ResetAllDialog mListener; public interface ResetAllDialog { void onResetAllDialog(); } public void setResetAllDialogListener(ResetAllDialog listener) { mListener = listener; } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { return new AlertDialog.Builder(getActivity()) .setTitle(R.string.reset_all) .setMessage(R.string.are_you_sure) .setNegativeButton(android.R.string.no, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // do nothing (will close dialog) AreYouSureResetAllDialogFragment.this.dismiss(); } }) .setPositiveButton(android.R.string.yes, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { AreYouSureResetAllDialogFragment.this.dismiss(); mListener.onResetAllDialog(); } }) .create(); } }