3

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 5

2

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

Sign up to request clarification or add additional context in comments.

Comments

1

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

I am trying to resolve the same issue in my app... However I can't find the 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.
@VaibhavSinghal In my code I have only changed the theme of Activity Which has EditText Field not the Entire application theme. You can only change the theme of that particular activity which has EditText field.
Yes, that's very much understandable, but I have tried to located the theme 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 @Rajendra
@VaibhavSinghal, set android:windowSoftInputMode="adjustPan" in your manifest for that particular activity.
0

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

1 Comment

Align your bottom edit text to bottom of the layout by making alignParentBottom true and remove android:windowSoftInputMode from manifest.
0

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.

Comments

0

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>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.