Adler
Adler

Reputation: 1492

Android - keyboard is shown below the activity instead of over the activity

I have a layout with an AutoCompleteTextView and when click on it to write something the keybord is shown as excepted but instead of cover the rest of the activity, it raises it up and some views with it that should have been covered (see image below - the back and next buttons should be in the bottom of the activity and the keyboard should cover them).

How can I avoid this kind of behavior.

(this layout is inside ViewPager and in other pages this behavior does not occur only after it's occurs once in this page)

worng keybord - the next and back buttons should be coverd

Thanks!

Upvotes: 2

Views: 1921

Answers (2)

Cata
Cata

Reputation: 11211

I had a similar problem with this (a opposite one :) ) and it seems that if you have a ScrollView in the Activity, causes this effect. Try to see if you have ScrollView in your Activity and take it down and see if it works.

Good luck!

Upvotes: 0

Daniel Fekete
Daniel Fekete

Reputation: 5028

Add this into your AndroidManifest.xml:

<activity 
    android:name="..." 
    android:windowSoftInputMode="adjustPan"> 
    ...

Read more about it in http://developer.android.com/resources/articles/on-screen-inputs.html "Enabling resize mode and other window features" part

Upvotes: 11

Related Questions