I have a layout which contain RelativeLayout as Root layout,Relative layoout contain ListView at Top and one Edittext align at the bottom of relative layout. In Pre lollipop version devices whenever soft keyboard open Edittext pushed up and I am able to see the Editext. But in lollipop soft keyboard hide the Editext. I have already set android:windowSoftInputMode="adjustPan|adjustResize" in manifest file. Please help me
5 Answers
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 !!!
4 Comments
Theme.Black.NoTitlteBar. Can you provide some additional info on the support library versions you are using. I am using v21 for supportv7 library and v19 for supportv4 library. Also as per your code above, you are changing the theme of your entire app and not just the EditText, correct me if I am wrong.Theme.Black.NoTitlteBar and unable to locate it. I am using com.android.support:appcompat-v7:21.0.+ and com.android.support:support-v4:19.1.0. Can you suggest any alternatives @RajendraMay be your activity is full screen. Try clearing the FULLSCREEN flag.
1 Comment
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>