Download Progress Fragment
A fragment for retaining a DownloadJob and showing its progress. Create the fragment via its constructor and set its job. This is a retained fragment and can't be used as nested fragment.
Properties
The DownloadJob being tracked and displayed by this fragment. Reading returns the retained job, or null if none was set. Assigning a job makes the fragment retain it across configuration changes (if added to the activity) and show its progress via a dialog.
Functions
Called when the dialog is cancelled by the user. Cancels the progress collection, cancels the download job, and notifies any registered cancel listener.
Creates and returns the download progress dialog.
Called when the view hierarchy associated with the fragment is being removed. Handles the retained instance bug by clearing the dismiss message.
Sets a DialogInterface.OnCancelListener that will be informed when the progress dialog was cancelled by the user. Calling this method will replace any previously set listener. You may provide null to clear the listener.