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.

Tag:google-ads-api, android, android-recyclerview

2 comments.

  1. Cuong Nguyen

    You should use DiffUtil to update data. Refer: diffUtil

  2. Mohini Thakkar

    Can you please try once with solution : myRecyclerView.disableItemAnimator()

Add a new comment.