abstract class DownloadDialogFragment : DialogFragment
(source)
This is a general representation of a dialog meant to be used in collaboration with DownloadsFeature to show a dialog before a download is triggered. If SimpleDownloadDialogFragment is not flexible enough for your use case you should inherit for this class. Be mindful to call onStartDownload when you want to start the download.
DownloadDialogFragment()
This is a general representation of a dialog meant to be used in collaboration with DownloadsFeature to show a dialog before a download is triggered. If SimpleDownloadDialogFragment is not flexible enough for your use case you should inherit for this class. Be mindful to call onStartDownload when you want to start the download. |
var onStartDownload: () -> Unit
A callback to trigger a download, call it when you are ready to start a download. For instance, a valid use case can be in confirmation dialog, after the positive button is clicked, this callback must be called. |
fun setDownload(download: Download): Unit
add the metadata of this download object to the arguments of this fragment. |
const val FRAGMENT_TAG: String |
|
const val KEY_CONTENT_LENGTH: String
Key for finding the content length in the arguments. |
|
const val KEY_FILE_NAME: String
Key for finding the file name in the arguments. |
|
const val KEY_URL: String
Key for finding the url in the arguments. |
class SimpleDownloadDialogFragment : DownloadDialogFragment
A confirmation dialog to be called before a download is triggered. Meant to be used in collaboration with DownloadsFeature |