如何显示/隐藏软键盘没有在Java中任何动画(如褪色)? [英] How to show/hide the soft keyboard without any animation (e.g. fade) in Java?

查看:94
本文介绍了如何显示/隐藏软键盘没有在Java中任何动画(如褪色)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么办法可以显示或隐藏即时软键盘,没有任何动画?在CyanogenMod的10也有褪色的动画显示。

Is there any way to show or hide the soft keyboard instantly, without any animation? In Cyanogenmod 10 it displays with a fading animation.

推荐答案

试试这样

InputMethodManager imm = (InputMethodManager)getSystemService(Context.
                                                    INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
    imm.showSoftInputFromInputMethod(getCurrentFocus().getWindowToken(), 0);

这篇关于如何显示/隐藏软键盘没有在Java中任何动画(如褪色)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆