Simon
Simon

Reputation: 2115

How to auto scroll to input field when using a RecyclerView

When the keyboard appears the RecyclerView doesn't automatically scroll to the position of the selected input field. So the keyboard gets over the selected field.

I tried to add android:windowSoftInputMode="stateVisible|adjustResize" to the activity as suggested in other questions but no luck.

Upvotes: 0

Views: 1810

Answers (1)

yigit
yigit

Reputation: 38273

Which layout manager are you using? There is a bug fix about this, but should work in most cases. The bugfix will be released in the next one or after :/, meanwhile, it might work to call scrollToPosition(clickedItemPosition) when keyboard comes up. (TextView focus)

Upvotes: 1

Related Questions