Question

I have a basic EditText over Google Maps as shown below

enter image description here Whenever I type something into the EditText field, the Google Maps in the "background" will automatically shift itself upwards, like shown below

enter image description here

(Note how the Google copyright logo appears due to the upward shift of the map)

Is there a way to fix this so that the map will remain as is (does not auto-shift) even when I type stuff in the EditText field?

Was it helpful?

Solution

You can simply switch your activity's windowSoftInputMode flag to "adjustPan". Check the official documentation for more info.

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

If you are using ScrollView add this too android:isScrollContainer="false"

Try it..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top