- // Declare the class variables.
- private lateinit var saveListener: SaveListener
-
- // Define the class variables.
- private var getUrlSize: AsyncTask<*, *, *>? = null
-
- // The public interface is used to send information back to the parent activity.
- interface SaveListener {
- fun onSaveUrl(originalUrlString: String, fileNameString: String, dialogFragment: DialogFragment)
- }
-
- override fun onAttach(context: Context) {
- // Run the default commands.
- super.onAttach(context)
-
- // Get a handle for the save webpage listener from the launching context.
- saveListener = context as SaveListener
- }
-