Back to project page Aegis.
The source code is released under:
GNU General Public License
If you think the Android project Aegis 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.decad3nce.aegis.Fragments; // w ww. j a v a 2 s . c o m import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; import android.content.DialogInterface; import android.os.Bundle; import com.decad3nce.aegis.R; public class InstallToSystemDialogFragment extends DialogFragment { public interface NoticeDialogListener { public void onDialogPositiveClick(DialogFragment dialog); public void onDialogNegativeClick(DialogFragment dialog); } NoticeDialogListener mListener; @Override public void onAttach(Activity activity) { super.onAttach(activity); try { mListener = (NoticeDialogListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement NoticeDialogListener"); } } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setMessage(R.string.advanced_dialog_install_to_system) .setPositiveButton(R.string.advanced_dialog_install, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { mListener.onDialogPositiveClick(InstallToSystemDialogFragment.this); } }) .setNegativeButton(R.string.advanced_dialog_cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { mListener.onDialogNegativeClick(InstallToSystemDialogFragment.this); } }); return builder.create(); } }