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

我在fragment,点击显示城市选择后,点击搜索,出现软键盘,取消后,fragment出现软键盘 #91

Open
yuwang0716 opened this issue Nov 8, 2019 · 7 comments

Comments

@yuwang0716
Copy link

我在fragment,点击显示城市选择后,点击搜索,出现软键盘,取消后,fragment出现软键盘

@yuwang0716
Copy link
Author

@OverRide
public void dismiss() {
View view = getCurrentFocus();
if (view instanceof TextView) {
InputMethodManager mInputMethodManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.RESULT_UNCHANGED_SHOWN);
}
super.dismiss();
}

@yuwang0716
Copy link
Author

这样可以解决

@zaaach
Copy link
Owner

zaaach commented Nov 8, 2019

暂时可以在取消监听里手动关闭吧,库本身没有处理=。=

@yuwang0716
Copy link
Author

yuwang0716 commented Nov 9, 2019 via email

@yuwang0716
Copy link
Author

yuwang0716 commented Nov 9, 2019 via email

@zaaach
Copy link
Owner

zaaach commented Nov 9, 2019

@brmnh666
Copy link

brmnh666 commented Dec 4, 2019

需要在getCurrentFocus(); 之前加个getDialog()

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

No branches or pull requests

3 participants