Soft keyboard hide EditText in lollipop version

痴心易碎 提交于 2019-12-04 13:04:09

try to give fitsSystemWindows in your main layout( for lollipop versions)

 android:fitsSystemWindows="true"

also in the manifest give

android:windowSoftInputMode="adjustResize"

hope this will help

Thanks for your valuable input. Finally I have fixed this issue.

What I found the reason behind this issue is application theme. My application theme was

android:Theme.Light in which I found this issue. I have only changed the theme of my EditText layout activity by setting

android:theme="@android:style/Theme.Black.NoTitleBar" e.g. <activity android:name=".activity.LiveStreamingActivity" android:label="@string/title_activity_event_performer" android:theme="@android:style/Theme.Black.NoTitleBar" android:screenOrientation="portrait" />

This solved my problem !!!

May be your activity is full screen. Try clearing the FULLSCREEN flag.

I too had the same issue and it was because of the usage of a menudrawer library which was not supported by lollipop and when I replace that with default navigation drawer of android the things started working fine.Please check with the libraries if you use any.

Lakshay Sharma

The important value is the adjustResize. This will shift the whole UI up to give room for the soft keyboard.

<activity
        android:name="com.my.MainActivity"
        android:screenOrientation="portrait"
        android:label="@string/title_activity_main"
        android:windowSoftInputMode="adjustResize|stateHidden" >
    </activity>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!