+ private lateinit var addDomainListener: AddDomainListener
+
// The public interface is used to send information back to the parent activity.
interface AddDomainListener {
fun onAddDomain(dialogFragment: DialogFragment)
}
// The public interface is used to send information back to the parent activity.
interface AddDomainListener {
fun onAddDomain(dialogFragment: DialogFragment)
}
- // The add domain listener is initialized in `onAttach()` and used in `onCreateDialog()`.
- private lateinit var addDomainListener: AddDomainListener
-
override fun onAttach(context: Context) {
// Run the default commands.
super.onAttach(context)
override fun onAttach(context: Context) {
// Run the default commands.
super.onAttach(context)
@@ -59,14+61,14 @@ class AddDomainDialog: DialogFragment() {
}
companion object {
}
companion object {
- // `@JvmStatic` will no longer be required once all the code has transitioned to Kotlin. Also, the function can then be moved out of a companion object and just become a package-level function.
+ // `@JvmStatic` will no longer be required once all the code has transitioned to Kotlin.
@JvmStatic
fun addDomain(urlString: String): AddDomainDialog {
// Create an arguments bundle.
val argumentsBundle = Bundle()
// Store the URL in the bundle.
@JvmStatic
fun addDomain(urlString: String): AddDomainDialog {