When the virtual keyboard opens, it resizes my layout. How can i made for put the keyboard on my layout? And what it doesn't re-size my layout?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can use manifest flags to configure the effect of the virtual keyboard. See http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft
回答2:
use only this code:
<application
android:windowSoftInputMode="adjustPan"
</application>
used in manifest-application tag for all application
回答3:
Android soft keyboard resize layout
<activity android:name=".activity.SignUpActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustResize" />
It's Working for me try it.
回答4:
Use 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.