我正在制作一个仅在横向模式下用于平板电脑的应用程序。在我的一个屏幕中,我使用带有编辑文本的自定义对话框,当用户输入编辑文本时,数字键盘会覆盖所有编辑文本,因此用户无法看到他/她在编辑文本中输入的内容。我已经使用了 imeOptions 但没有成功。请提出任何其他解决方案。
最佳答案
在AndroidManifest.xml中使用“调整调整大小”
<activity
...
android:windowSoftInputMode="adjustResize" />
来自文档:
"adjustResize" The activity's main window is always resized to make room for the soft keyboard on screen.
"adjustPan" The activity's main window is not resized to make room for the soft keyboard. Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing. This is generally less desirable than resizing, because the user may need to close the soft keyboard to get at and interact with obscured parts of the window.
关于android - 如何解决出现数字键盘时编辑文本隐藏的问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29818545/