Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 522
Adler Avatar asked Jan 18 '26 09:01

Adler


1 Answers

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

like image 133
Daniel Fekete Avatar answered Jan 21 '26 00:01

Daniel Fekete