How to avoid blinking effect after notifyDataSetChanged
I have integrated Google Ads in my application and when I call notifyDataSetChnaged, ads are blinking.
I tried following solutions -
fun RecyclerView.disableItemAnimator() { var animator: RecyclerView.ItemAnimator? = home_article_recyclerview.getItemAnimator(); if (animator is SimpleItemAnimator) { animator.setSupportsChangeAnimations(false); } }
And
itemAnimator?.changeDuration = 0
But none of them are working. Any help would be appreciated.