本文介绍了如何检测软键盘输入法会覆盖整个屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个应用程序,用户可以在其中单击选项卡并以编程方式显示软键盘.但是,如果软键盘要像这样覆盖整个屏幕(如提取的 EditText),我不想显示它:

I'm creating an app where users can click on a tab and soft keyboard will be shown programmatically. However, I don't want to display the soft keyboard if it's going to cover the whole screen (like extracted EditText) like this:

检测屏幕方向可能会有所帮助,但在平板电脑上 AFAIK,即使在横向上,软键盘也不会覆盖整个屏幕.那还有什么办法吗?

Detecting screen orientation might help, but AFAIK on tablets, the soft keyboard won't cover the whole screen even on landscape. So is there any other way?

推荐答案

不确定它是否适合你,但也许你可以 禁用全屏软输入,而不是弄清楚检测部分.

Not sure if it will work for you, but maybe you can disable fullscreen soft input instead of figuring out the detection part.

这篇关于如何检测软键盘输入法会覆盖整个屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 20:10