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

Permanent keyboard #244

Open
KevCel opened this issue Jun 5, 2017 · 3 comments
Open

Permanent keyboard #244

KevCel opened this issue Jun 5, 2017 · 3 comments

Comments

@KevCel
Copy link

KevCel commented Jun 5, 2017

When I hide app/debug app/someone call to me a keyboard is still visible.

Android 6.0, LG K8
device

@spiralni
Copy link

spiralni commented Jun 9, 2017

It happens to me too.. I am using a device with android 5.0

@KevCel
Copy link
Author

KevCel commented Jun 9, 2017

It's my temporary solution.

`@Override
protected void onPause() {
super.onPause();

    View view = this.getCurrentFocus();
    if (view != null) {
        InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
    }
}`

@eduardbosch
Copy link

I've tried to find a way to hide the keyboard from the view automatically, but I haven't found a way to ensure that Util.closeSoftKeyboard is called before the activity has paused. So calling Util.closeSoftKeyboard after the activity has paused does not hide the keyboard.

I think the best solution is @KevCel to be sure that the keyboard is hidden before pausing an activity.

Maybe a better approach could be to use the library close function to be sure we hide the keyboard the same way as the library does:


    @Override
    protected void onPause() {
        // Hide keyboard always on pause
        Util.closeSoftKeyboard(this);

        super.onPause();
    }

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

3 participants