java.lang.Object | |||
↳ | androidx.fragment.app.Fragment | ||
↳ | androidx.fragment.app.DialogFragment | ||
↳ | com.pspdfkit.document.download.DownloadProgressFragment |
A fragment for retaining a DownloadJob
and showing its progress. Create the fragment via
its constructor and call setJob(DownloadJob)
. This is a retained fragment and can't be
used as nested fragment.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected Dialog | dialog | The currently displayed dialog. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DownloadProgressFragment() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Dialog |
getDialog()
Returns the ProgressDialog that is used by this fragment.
| ||||||||||
DownloadJob |
getJob()
Returns the set
DownloadJob (if any). | ||||||||||
void | onCancel(DialogInterface dialog) | ||||||||||
void | onCreate(Bundle savedInstanceState) | ||||||||||
final Dialog | onCreateDialog(Bundle savedInstanceState) | ||||||||||
void | onDestroyView() | ||||||||||
void |
setDialogOnCancelListener(DialogInterface.OnCancelListener dialogCancelListener)
Sets a
DialogInterface.OnCancelListener that will be informed when the progress dialog was
cancelled by the user. | ||||||||||
void |
setJob(DownloadJob job)
Sets a
DownloadJob . |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
configureDialog(Progress progress, boolean isIndeterminate)
Called when the first download progress was received to allow you to configure your dialog.
| ||||||||||
Dialog |
createDialog()
Called to allow you to create your download dialog.
| ||||||||||
void |
updateProgress(Progress progress)
Called when the download progress was updated.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Returns the ProgressDialog that is used by this fragment.
null
if it's
not yet initialized.
Returns the set DownloadJob
(if any). This can be used to retrieve the retained job
after a configuration change happened.
DownloadJob
that was previously set via setJob(DownloadJob)
or
null
if no job was set.
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.
dialogCancelListener | DialogInterface.OnCancelListener that should be notified, or
null to clear the listener.
|
---|
Sets a DownloadJob
. The fragment will retain the job across configuration changes (if
added to the activity) and show its progress via a dialog.
job | The DownloadJob to retain and visualize.
|
---|
Called when the first download progress was received to allow you to configure your dialog. Make sure to not call through to super.
progress | The first progress item received. |
---|---|
isIndeterminate | If this progress is indeterminate. |
Called to allow you to create your download dialog. Make sure to not call through to super.
DownloadProgressFragment
.
Called when the download progress was updated. Make sure to not call through to super.
progress | The current download progress. |
---|