- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我在主 Activity 的 onCreate 中有以下代码:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
我的 layout-land/main.xml 中有以下代码
<EditText android:imeOptions="flagNoExtractUi</EditText>
为什么 softinput 叠加在 UI 之上,但在横向模式下不会改变其大小?
我怎样才能使具有软输入的 UI 在横向模式下的行为与在纵向模式下的行为相同?
最佳答案
嘿 Divers 可能是因为您在 manifest.xml 中的 IME 选项声明中缺少右引号。
希望对您有所帮助!!
道格
关于android - 为什么 getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);在横向模式下不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5351114/
在我的 Android 项目中,我希望只有一个 fragment 的 softInputMode 为 adjustPan。 将以下行添加到我的 list (在 Activity 内)按预期工作: an
我在 ViewPager 中有 2 个 fragment ,我希望窗口根据第二个 fragment 上的软键盘进行不同的调整。这是我正在尝试的: @Override public void onPag
我需要在 DialogFragment 出现时显示键盘,所以我这样做了: dialog.window.setSoftInputMode(WindowManager.LayoutParams.SOFT_
我有一个自定义对话框,它在 View 底部有一个 EditText。当我选择 EditText 时,键盘出现但在对话框中隐藏了 EditText。 我知道您可以将 windowSoftInputMod
我在主 Activity 的 onCreate 中有以下代码: getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_
我是一名优秀的程序员,十分优秀!