Show SoftKeyboard in landscape but not entire screen

五迷三道 提交于 2019-12-10 22:18:10

问题


Im trying to achieve something like this image:

the problem its when im on landscape and put a searchbar like the image, the soft keyboard cover all screen,and i want the behavior like the image i tried

 android:windowSoftInputMode="adjustPan|adjustResize"

and seems isnt working,at least on jelly bean. any ideas? Thanks


回答1:


i found the solution, in imeOptions of EditText, so i used

android:imeOptions="flagNoFullscreen"

so the screen now its in middle :)

<EditText
    android:id="@+id/txt_search"
    android:inputType="text"
    android:imeOptions="flagNoFullscreen"
    android:hint="@string/hint_search"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
/>


来源:https://stackoverflow.com/questions/13277177/show-softkeyboard-in-landscape-but-not-entire-screen

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