Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6cbf14e authored by tibbi's avatar tibbi
Browse files

add an alertdialog helper extension for hiding the keyboard

parent afbe4eda
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '3.14.4'
        propVersionName = '3.14.5'
        kotlin_version = '1.2.30'
        support_libs = '27.0.2'
    }
+4 −0
Original line number Diff line number Diff line
@@ -12,3 +12,7 @@ fun AlertDialog.showKeyboard(editText: EditText) {
        }
    }
}

fun AlertDialog.hideKeyboard() {
    window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
}