Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keybord not hiding #26

Open
roiacult opened this issue Jul 21, 2020 · 1 comment
Open

keybord not hiding #26

roiacult opened this issue Jul 21, 2020 · 1 comment

Comments

@roiacult
Copy link

When typing a number in the view and press done the keyboard dosn't hide

@roiacult
Copy link
Author

a workaround

for( v in numberPicker.children) {
        if(v is EditText) {
            v.setOnEditorActionListener { _, _, _ -> 
                 v.clearFocus()
                 val imm = v.context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
                 imm.hideSoftInputFromWindow(v.windowToken, 0)
                  true
            }
            return
        }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant