Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: copy/paste bar gets pushed out of screen by soft keyboard

When i double touch on a word in my edittext the copy/paste bar shows. Thats fine. The Problem is that the copy/paste bar appears out of the screen. Seems to.. it get´s pushed up by the soft keyboard. See the Screenshot.

enter image description here

My question: How can make the copy/paste bar fixed, so it won´t move?

I use "adjustPan" in the Manifest.

like image 734
Nao Kreuzeder Avatar asked Dec 11 '25 00:12

Nao Kreuzeder


1 Answers

Finally i found the solution to my problem. Maybe it is helpful to someone else ...

  1. use adjustResize instead of adjustPan in the Manifest
  2. Surround your xml layout with a ScrollView
  3. Also specify a android:minHeight for your EditText

This did not work, when i used a RelativeLayout as main view for my ScrollView. So you better use a LinearLayout or FrameLayout etc...

=)

like image 140
Nao Kreuzeder Avatar answered Dec 12 '25 13:12

Nao Kreuzeder