user3572576
user3572576

Reputation: 61

Keyboard over EditText on second click

This is the picture:

enter image description here

When I click on the "Confirm password" EditText, for the first time, it works the way it should - layout pops up so I can enter text in selected EditText, but when I dismiss keyboard(that EditText still focused) and click on that same EditText again, it stays under keyboard.

Main layout is RelativeLayout, input fields are in ScrollView and buttons are in LinearLayout aligned to parent bottom.

In manifest I have android:windowSoftInputMode="adjustPan".

Is this some Android issue or I've been doing something wrong?

Upvotes: 6

Views: 2217

Answers (3)

Vlad
Vlad

Reputation: 8553

For me removing android:minWidth does the trick

Upvotes: 0

Carlos Mion
Carlos Mion

Reputation: 37

I just came with a workaround for this problem as well, I got my edit text to start the text in the middle of the screen with a not so great solution, but it works for me. The code is this one:

        <EditText
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:paddingStart="130sp"
        android:paddingEnd="50sp"
        android:descendantFocusability="beforeDescendants"
        android:focusableInTouchMode="true"
        android:gravity="bottom"/>

Upvotes: -1

Nabeel K
Nabeel K

Reputation: 6128

It's actually a bug in EditText. try removing gravity of EditText, which could be either center_horizontal or center

Got the answer from another question. check this.

Upvotes: 4

Related Questions