Q: Hide android default keyboard as I have my own number pad in Kotlin I have my own number keypad. I need edittext but I do not need the keypad.
Am doing this project in kotlin. There is an answer here Is there any way to permanently hide soft keyboard but keep enabling focus for an EditText?  and also How do you close/hide the Android soft keyboard using Java? however i could not find the code in kotlin.
I need code in kotlin .
Thanks in advance.
https://snipboard.io/qZ0fYW.jpg i copied Java code and Android Studio converted it to java but it failed and giving error.

A: You have to either do:
calcET.setOnClickListener(object: View.OnClickListener {
            override fun onClick(v: View?) {
                //code here
            }

        })

notice the brackets are removed and the override keyword added
or simply:
calcET.setOnClickListener {
            //code here
        }


A: You can use the below extension to hide Keyboard
 fun Activity.hideKeyboard() {
     val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as 
     InputMethodManager 
     imm.hideSoftInputFromWindow(findViewById<View>. 
     (android.R.id.content).windowToken,0) 
 }

