Code example for DialogFragment

Methods: setArguments

0
 
      args.putInt(ARG_STATUS, status);
 
      ErrorDialogFragment result=new ErrorDialogFragment();
 
      result.setArguments(args);
 
      return(result);
    } 
 
    @Override 
    public Dialog onCreateDialog(Bundle savedInstanceState) {
      Bundle args=getArguments();
 
      return GooglePlayServicesUtil.getErrorDialog(args.getInt(ARG_STATUS),
                                                   getActivity(), 0);
    } 
 
    @Override 
    public void onDismiss(DialogInterface dlg) {
      if (getActivity() != null) {