seema
seema

Reputation: 991

RecyclerView scrolls to top after keyboard hides

I have a recyclerView with height and width matchParent, above and below some views. View below recyclerView is editText. When something is typed in editText and keyboard closes, recyclerView scrolls to top. Any idea why it is happening and how it can be resolved.

Related xml at: https://gist.github.com/anonymous/42c38f8a50daf0f441552c985e29a309

Upvotes: 1

Views: 544

Answers (1)

Mina Farid
Mina Farid

Reputation: 5887

You can try to add this code to your manifest:

android:windowSoftInputMode="adjustPan"

<activity
    android:name=".YourActivity"
    android:configChanges="keyboard|keyboardHidden"
    android:label="@string/title_activity"
    android:windowSoftInputMode="adjustPan" 
    >

EDIT

Upvotes: 2

Related Questions