android - How to monitor the display and hiding of the full-screen soft keyboard when the screen is horizontal?
巴扎黑
巴扎黑 2017-05-16 13:25:24
0
1
579

When the screen is displayed horizontally, the soft keyboard takes up the entire screen. Is there any way to monitor the display and hiding of the soft keyboard?

巴扎黑
巴扎黑

reply all(1)
过去多啦不再A梦

There is
in activity

@Override🎜
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
}
这个方法监听配置改变,也就是横竖屏切换,
 int requestedOrientation = getRequestedOrientation();
            if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
                //隐藏软键盘
            }
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!