Code example for DialogFragment

Methods: setArguments, setTargetFragment

0
  public static DownloadSizeDialogFragment newInstance(Fragment paramFragment, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3)
  { 
    if (!(paramFragment instanceof DownloadSizeDialogListener))
      throw new IllegalArgumentException("targetFragment must implement DownloadSizeDialogListener");
    DownloadSizeDialogFragment localDownloadSizeDialogFragment = new DownloadSizeDialogFragment();
    localDownloadSizeDialogFragment.setTargetFragment(paramFragment, -1);
    Bundle localBundle = new Bundle();
    localBundle.putBoolean("setWifiOnly", paramBoolean1);
    localBundle.putBoolean("showWifiOnly", paramBoolean2);
    localDownloadSizeDialogFragment.setArguments(localBundle);
    return localDownloadSizeDialogFragment;
  } 
 
  public Dialog onCreateDialog(Bundle paramBundle)
  { 
    Bundle localBundle = getArguments();
    final boolean bool1 = localBundle.getBoolean("showWifiOnly");
    final boolean bool2 = localBundle.getBoolean("setWifiOnly");
    boolean bool3 = localBundle.getBoolean("onMobileNetwork");
    FragmentActivity localFragmentActivity = getActivity();