0

I am using a ListView with some EditTexts in the items, and with a floating action bottom (fab) at the bottom of the screen (over the list view).

What I want when I select an EditView and the keyboard appears over it:

  • the ListView is scrolled to show the EditView.
  • the fab stays at the bottom of the screen.
  • nothing else.

What I get :

  • the list view is not scrolled to the item, the keyboard does not target the touched EditText, it targets nothing (the keyboard opens in the good input mode then resets).
  • the fab moves aligned to the keyboard instead of being covered.

I tried the option android:windowSoftInputMode="adjustNothing", then the fab stays at the bottom as expected, but the listView doesn't scroll to the editText. The keyboard is targeting the good EditText. It is almost good except I would need to re implement the scrolling to the item.

I tried the option android:windowSoftInputMode="adjustPan", then the whole screen is moved up, which is not the expected behavior.

Is there actually a solution for that or should I stick to the "not great but at least functional" adjustPan ?

Simon
  • 2,067
  • 2
  • 17
  • 30

1 Answers1

0

ListView don't do well with editable views, because the inner views get redrawn once or mutiple times, causing multiple focus events.

This happens since '10, so I don't expect a fix any time soon. I work arounded the issue.

Buggy ListView makes me sad

Community
  • 1
  • 1
Simon
  • 2,067
  • 2
  • 17
  • 30