1

I have a problem

I put a recyclerview in nestedscrollview when keyboard open, nestedscrollview auto scroll down and edittext loses focus, keyboard hide edittext of item in recyclerview

How to I sloved it

Please, help me !!! Thanks all

1 Answer 1

0

It usually happens when using recyclerview & nestedscrollview together.

There are 2 approaches.

  1. Disable the nested scrolling of recyclerview by recyclerView.setNestedScrollingEnabled(false);

  2. add softInputMode="adjustPan" in your activity tag in the Manifest. If adjustPan doesn't work, then try adjustResize.

And yes. Change your view hierarchy like this :

<androidx.core.widget.NestedScrollView>
....
<LinearLayout>
...
<androidx.recyclerview.widget.RecyclerView>
....
</androidx.recyclerview.widget.RecyclerView>
<LinearLayout>
</androidx.core.widget.NestedScrollView>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.