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

悬浮窗输入文本后,点击返回键没有反应的处理办法 #24

Closed
jinshiyi11 opened this issue Sep 27, 2019 · 1 comment
Closed

Comments

@jinshiyi11
Copy link

jinshiyi11 commented Sep 27, 2019

可以在根布局视图类添加

@Override
public boolean dispatchKeyEventPreIme(KeyEvent event) {
    boolean result = super.dispatchKeyEventPreIme(event);
    if (event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
        InputMethodUtils.closedInputMethod(FLOAT_TAG);
    }
    return result;
}
@princekin-f
Copy link
Owner

哈哈,多谢大佬的指点,确实好使!
回头加个api,通过config配置是否包含输入框。再次感谢...

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

2 participants