Android soft keyboard resize layout

拟墨画扇 提交于 2019-11-27 19:22:01

问题


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:


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.




回答3:


use only this code:

    <application
    android:windowSoftInputMode="adjustPan"
    </application>

used in manifest-application tag for all application




回答4:


<application
    android:windowSoftInputMode="adjustResize"> 
</application>

adjustPan only resizes the input field by pushing it up just a little above the keyboard, in which case the keyboard still covers every other view beneath it.



来源:https://stackoverflow.com/questions/6765534/android-soft-keyboard-resize-layout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!