cymcsg / UltimateRecyclerView

A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features.
Apache License 2.0
7.22k stars 1.43k forks source link

Use Sticky Header with notifyItemChanged. Flash issue #129

Open KingWu opened 9 years ago

KingWu commented 9 years ago

Hi, try to implement UltimateRecyclerView with Sticky Header. When click list item, i use notifyItemChanged with position to update the item's UI. But, the position of sticky header will be calculated wrong. You will see a Flash issue. The header show down side and then show upper sider.

jjhesk commented 8 years ago

this is related to item notifications, we will review it later for the stability issue. at the same would u post your code here so we can help u? @KingWu

Studentessa commented 8 years ago

Hi @KingWu , the same occur to me! I have do:

  1. myArray.clear()
  2. populate the array with new content.
  3. myAdapter.notifyDataSetChanged();

And as you say the position of sticky header is calculated wrong.

ppodgorski commented 7 years ago

You can disable animation to fix this flash issue: ((SimpleItemAnimator) recyclerView.getItemAnimator()).setSupportsChangeAnimations(false);