java android 窗口软输入模式

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10318956/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 00:33:01  来源:igfitidea点击:

android Window Soft Input Mode

javaandroidinputkeyboard

提问by user1319976

In my app, I need to use EditText. But i have a problem with it. On some firmwares (Ice cream sandwich for example) when user click on edittext, keyboard pushes whole screen up! I want to turn it off.

在我的应用程序中,我需要使用 EditText。但我有问题。在某些固件(例如冰淇淋三明治)上,当用户单击编辑文本时,键盘会向上推整个屏幕!我想关掉它。

I tried to add android:windowSoftInputMode="adjustResize". Nothing changed.

我试图添加 android:windowSoftInputMode="adjustResize"。没有改变。

Help me please.

请帮帮我。

回答by Parag Chauhan

try

尝试

 android:windowSoftInputMode="adjustPan"

That perfect work for you.

对你来说完美的作品。

回答by Manoj Kumar

Add this in your AndroidManifest.xml

将此添加到您的 AndroidManifest.xml 中

android:windowSoftInputMode="stateHidden"

Perfectly works for me. You try this one.

非常适合我。你试试这个。