// The public interface is used to send information back to the parent activity.
interface AddDomainListener {
// The public interface is used to send information back to the parent activity.
interface AddDomainListener {
// Set the add button listener.
dialogBuilder.setPositiveButton(R.string.add) { _: DialogInterface, _: Int ->
// Return the dialog fragment to the parent activity on add.
// Set the add button listener.
dialogBuilder.setPositiveButton(R.string.add) { _: DialogInterface, _: Int ->
// Return the dialog fragment to the parent activity on add.
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
// Get the screenshot preference.
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
// Get the screenshot preference.
// Check the key code and event.
if (keyCode == KeyEvent.KEYCODE_ENTER && keyEvent.action == KeyEvent.ACTION_DOWN) { // The event is a key-down on the enter key.
// Trigger the add domain listener and return the dialog fragment to the parent activity.
// Check the key code and event.
if (keyCode == KeyEvent.KEYCODE_ENTER && keyEvent.action == KeyEvent.ACTION_DOWN) { // The event is a key-down on the enter key.
// Trigger the add domain listener and return the dialog fragment to the parent activity.