-class SaveDialog : DialogFragment() {
- // Declare the class variables.
- private lateinit var saveListener: SaveListener
- private lateinit var fileName: String
-
- // The public interface is used to send information back to the parent activity.
- interface SaveListener {
- fun onSave(saveType: Int, dialogFragment: DialogFragment)
- }
-
- override fun onAttach(context: Context) {
- // Run the default commands.
- super.onAttach(context)
-
- // Get a handle for the save listener from the launching context.
- saveListener = context as SaveListener
- }
+// Define the private class constants.
+private const val URL_STRING = "url_string"
+private const val FILE_SIZE_STRING = "file_size_string"
+private const val FILE_NAME_STRING = "file_name_string"
+private const val USER_AGENT_STRING = "user_agent_string"
+private const val COOKIES_ENABLED = "cookies_enabled"