- private int downloadType;
-
- public static DownloadLocationPermissionDialog downloadType(int type) {
- // Create an arguments bundle.
- Bundle argumentsBundle = new Bundle();
-
- // Store the download type in the bundle.
- argumentsBundle.putInt("Download_Type", type);
-
- // Add the arguments bundle to this instance of `DownloadLocationPermissionDialog`.
- DownloadLocationPermissionDialog thisDownloadLocationPermissionDialog = new DownloadLocationPermissionDialog();
- thisDownloadLocationPermissionDialog.setArguments(argumentsBundle);
- return thisDownloadLocationPermissionDialog;
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // Store the download type in the local class variable.
- downloadType = getArguments().getInt("Download_Type");
- }
+ // The listener is used in `onAttach()` and `onCreateDialog()`.
+ private DownloadLocationPermissionDialogListener downloadLocationPermissionDialogListener;