Android Facebook Messenger 键盘调整 Activity 布局

标签 android

我试图在我的 Activity 中修复布局调整大小当键盘出现在屏幕上时。我试过输入 manifestactivity 上: windowsSoftInputMode="stateAlwaysHidden"但没有结果,我的layout当我打开 keyboard 时仍在调整大小与 Messenger 上的某人不同寻常。

最佳答案

如果您正在做我认为您正在做的事情,stateAlwaysHidden 不是解决问题的方法。

<activity android:windowSoftInputMode="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.

这就是,我想你想要的。平底锅不要换

这是相关文档的链接 http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft

关于Android Facebook Messenger 键盘调整 Activity 布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33524862/

相关文章:

java - 用 boolean 值填充二维数组

android - 如何比较android中的已知时间和当前时间?

android - 如何在 AppWidgetProvider 中调用 onUpdate()?

android - onResume 方法不适用于 Twitter 实现

javascript - 聆听点击和拖动的值并相应地运行

android - 直接实现监听器或在类上实现(性能)

javascript - 使用javascript捕获在android虚拟键盘上键入的键

android - 在 Android 上默默地使用短信?

机器人定时器摆动

android - 没有通知显示安卓