majidkabir
majidkabir

Reputation: 151

Recyclerview automatically scroll up (a little) when update

I have a RecyclerView in CoordinatorLayout in a fragment, there is a problem with RecyclerView in some situations, when I reload this fragment or calling notifyDataSetChanged(), RecyclerView automatically scroll up a little (about 1 cm)!!!! And because of this, scrolling on AppBarLayout doe's not work! It's on android 4.2.2. I googled it and cant find anything about this!

Upvotes: 3

Views: 786

Answers (1)

majidkabir
majidkabir

Reputation: 151

Deepak Rathore answer worked for me.

Adding android:descendantFocusability="blocksDescendants" to coordiante layout fixed my problem.

Upvotes: 3

Related Questions