SimpleMessageDialogFragment.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package com.epson.cameracopy.ui;
  2. import android.app.AlertDialog;
  3. import android.app.Dialog;
  4. import android.content.DialogInterface;
  5. import android.os.Bundle;
  6. /* renamed from: com.epson.cameracopy.ui.SimpleMessageDialogFragment */
  7. public class SimpleMessageDialogFragment extends DialogFragment {
  8. private static final String PARAM_MESSAGE_RESOURCE_ID = "resource-id";
  9. private int mResourceId;
  10. static SimpleMessageDialogFragment newInstance(int i) {
  11. SimpleMessageDialogFragment simpleMessageDialogFragment = new SimpleMessageDialogFragment();
  12. Bundle bundle = new Bundle();
  13. bundle.putInt(PARAM_MESSAGE_RESOURCE_ID, i);
  14. simpleMessageDialogFragment.setArguments(bundle);
  15. return simpleMessageDialogFragment;
  16. }
  17. public void onCreate(Bundle bundle) {
  18. super.onCreate(bundle);
  19. mResourceId = getArguments().getInt(PARAM_MESSAGE_RESOURCE_ID);
  20. }
  21. public Dialog onCreateDialog(Bundle bundle) {
  22. super.onCreateDialog(bundle);
  23. AlertDialog create = new AlertDialog.Builder(getActivity()).setMessage(getResources().getString(mResourceId)).setPositiveButton(R.string.ok_button, new DialogInterface.OnClickListener() {
  24. public void onClick(DialogInterface dialogInterface, int i) {
  25. }
  26. }).create();
  27. create.setCanceledOnTouchOutside(false);
  28. return create;
  29. }
  30. }