RecyclerView blinking after notifyDatasetChanged()












86















I have a RecyclerView which loads some data from API, includes an image url and some data, and I use networkImageView to lazy load image.



@Override
public void onResponse(List<Item> response) {
mItems.clear();
for (Item item : response) {
mItems.add(item);
}
mAdapter.notifyDataSetChanged();
mSwipeRefreshLayout.setRefreshing(false);
}


Here is implementation for Adapter:



public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, final int position) {
if (isHeader(position)) {
return;
}
// - get element from your dataset at this position
// - replace the contents of the view with that element
MyViewHolder holder = (MyViewHolder) viewHolder;
final Item item = mItems.get(position - 1); // Subtract 1 for header
holder.title.setText(item.getTitle());
holder.image.setImageUrl(item.getImg_url(), VolleyClient.getInstance(mCtx).getImageLoader());
holder.image.setErrorImageResId(android.R.drawable.ic_dialog_alert);
holder.origin.setText(item.getOrigin());
}


Problem is when we have refresh in the recyclerView, it is blincking for a very short while in the beginning which looks strange.



I just used GridView/ListView instead and it worked as I expected. There were no blincking.



configuration for RecycleView in onViewCreated of my Fragment:



mRecyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
// use this setting to improve performance if you know that changes
// in content do not change the layout size of the RecyclerView
mRecyclerView.setHasFixedSize(true);

mGridLayoutManager = (GridLayoutManager) mRecyclerView.getLayoutManager();
mGridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
return mAdapter.isHeader(position) ? mGridLayoutManager.getSpanCount() : 1;
}
});

mRecyclerView.setAdapter(mAdapter);


Anyone faced with such a problem? what could be the reason?










share|improve this question

























  • Possible duplicate of Disable onChange animations on ItemAnimator for RecyclerView

    – Apfelsaft23
    Nov 24 '18 at 15:06
















86















I have a RecyclerView which loads some data from API, includes an image url and some data, and I use networkImageView to lazy load image.



@Override
public void onResponse(List<Item> response) {
mItems.clear();
for (Item item : response) {
mItems.add(item);
}
mAdapter.notifyDataSetChanged();
mSwipeRefreshLayout.setRefreshing(false);
}


Here is implementation for Adapter:



public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, final int position) {
if (isHeader(position)) {
return;
}
// - get element from your dataset at this position
// - replace the contents of the view with that element
MyViewHolder holder = (MyViewHolder) viewHolder;
final Item item = mItems.get(position - 1); // Subtract 1 for header
holder.title.setText(item.getTitle());
holder.image.setImageUrl(item.getImg_url(), VolleyClient.getInstance(mCtx).getImageLoader());
holder.image.setErrorImageResId(android.R.drawable.ic_dialog_alert);
holder.origin.setText(item.getOrigin());
}


Problem is when we have refresh in the recyclerView, it is blincking for a very short while in the beginning which looks strange.



I just used GridView/ListView instead and it worked as I expected. There were no blincking.



configuration for RecycleView in onViewCreated of my Fragment:



mRecyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
// use this setting to improve performance if you know that changes
// in content do not change the layout size of the RecyclerView
mRecyclerView.setHasFixedSize(true);

mGridLayoutManager = (GridLayoutManager) mRecyclerView.getLayoutManager();
mGridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
return mAdapter.isHeader(position) ? mGridLayoutManager.getSpanCount() : 1;
}
});

mRecyclerView.setAdapter(mAdapter);


Anyone faced with such a problem? what could be the reason?










share|improve this question

























  • Possible duplicate of Disable onChange animations on ItemAnimator for RecyclerView

    – Apfelsaft23
    Nov 24 '18 at 15:06














86












86








86


13






I have a RecyclerView which loads some data from API, includes an image url and some data, and I use networkImageView to lazy load image.



@Override
public void onResponse(List<Item> response) {
mItems.clear();
for (Item item : response) {
mItems.add(item);
}
mAdapter.notifyDataSetChanged();
mSwipeRefreshLayout.setRefreshing(false);
}


Here is implementation for Adapter:



public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, final int position) {
if (isHeader(position)) {
return;
}
// - get element from your dataset at this position
// - replace the contents of the view with that element
MyViewHolder holder = (MyViewHolder) viewHolder;
final Item item = mItems.get(position - 1); // Subtract 1 for header
holder.title.setText(item.getTitle());
holder.image.setImageUrl(item.getImg_url(), VolleyClient.getInstance(mCtx).getImageLoader());
holder.image.setErrorImageResId(android.R.drawable.ic_dialog_alert);
holder.origin.setText(item.getOrigin());
}


Problem is when we have refresh in the recyclerView, it is blincking for a very short while in the beginning which looks strange.



I just used GridView/ListView instead and it worked as I expected. There were no blincking.



configuration for RecycleView in onViewCreated of my Fragment:



mRecyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
// use this setting to improve performance if you know that changes
// in content do not change the layout size of the RecyclerView
mRecyclerView.setHasFixedSize(true);

mGridLayoutManager = (GridLayoutManager) mRecyclerView.getLayoutManager();
mGridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
return mAdapter.isHeader(position) ? mGridLayoutManager.getSpanCount() : 1;
}
});

mRecyclerView.setAdapter(mAdapter);


Anyone faced with such a problem? what could be the reason?










share|improve this question
















I have a RecyclerView which loads some data from API, includes an image url and some data, and I use networkImageView to lazy load image.



@Override
public void onResponse(List<Item> response) {
mItems.clear();
for (Item item : response) {
mItems.add(item);
}
mAdapter.notifyDataSetChanged();
mSwipeRefreshLayout.setRefreshing(false);
}


Here is implementation for Adapter:



public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, final int position) {
if (isHeader(position)) {
return;
}
// - get element from your dataset at this position
// - replace the contents of the view with that element
MyViewHolder holder = (MyViewHolder) viewHolder;
final Item item = mItems.get(position - 1); // Subtract 1 for header
holder.title.setText(item.getTitle());
holder.image.setImageUrl(item.getImg_url(), VolleyClient.getInstance(mCtx).getImageLoader());
holder.image.setErrorImageResId(android.R.drawable.ic_dialog_alert);
holder.origin.setText(item.getOrigin());
}


Problem is when we have refresh in the recyclerView, it is blincking for a very short while in the beginning which looks strange.



I just used GridView/ListView instead and it worked as I expected. There were no blincking.



configuration for RecycleView in onViewCreated of my Fragment:



mRecyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
// use this setting to improve performance if you know that changes
// in content do not change the layout size of the RecyclerView
mRecyclerView.setHasFixedSize(true);

mGridLayoutManager = (GridLayoutManager) mRecyclerView.getLayoutManager();
mGridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
return mAdapter.isHeader(position) ? mGridLayoutManager.getSpanCount() : 1;
}
});

mRecyclerView.setAdapter(mAdapter);


Anyone faced with such a problem? what could be the reason?







android android-fragments android-recyclerview






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 30 '15 at 8:35







Ali

















asked Mar 29 '15 at 15:35









AliAli

4,6331650114




4,6331650114













  • Possible duplicate of Disable onChange animations on ItemAnimator for RecyclerView

    – Apfelsaft23
    Nov 24 '18 at 15:06



















  • Possible duplicate of Disable onChange animations on ItemAnimator for RecyclerView

    – Apfelsaft23
    Nov 24 '18 at 15:06

















Possible duplicate of Disable onChange animations on ItemAnimator for RecyclerView

– Apfelsaft23
Nov 24 '18 at 15:06





Possible duplicate of Disable onChange animations on ItemAnimator for RecyclerView

– Apfelsaft23
Nov 24 '18 at 15:06












12 Answers
12






active

oldest

votes


















95














Try using stable IDs in your RecyclerView.Adapter



setHasStableIds(true) and override getItemId(int position).



Without stable IDs, after notifyDataSetChanged(), ViewHolders usually assigned to not to same positions. That was the reason of blinking in my case.



You can find a good explanation here.






share|improve this answer





















  • 3





    works perfectly. freaking awesome

    – Ajay Shrestha
    Aug 30 '16 at 20:42






  • 3





    This is the most correct answer

    – Daniel López Lacalle
    Sep 27 '16 at 12:43











  • prefect solution

    – Naveen Kumar M
    Oct 28 '16 at 8:38











  • this should be marked as the right answer

    – Jignesh Shah
    Dec 21 '16 at 12:18






  • 2





    Any idea on how should we generate the ID?

    – Mauker
    Jul 25 '17 at 16:34



















81














According to this issue page ....it is the default recycleview item change animation... You can turn it off.. try this



recyclerView.getItemAnimator().setSupportsChangeAnimations(false);


Change in latest version



Quoted from Android developer blog:




Note that this new API is not backward compatible. If you previously
implemented an ItemAnimator, you can instead extend
SimpleItemAnimator, which provides the old API by wrapping the new
API. You’ll also notice that some methods have been entirely removed
from ItemAnimator. For example, if you were calling
recyclerView.getItemAnimator().setSupportsChangeAnimations(false),
this code won’t compile anymore. You can replace it with:



ItemAnimator animator = recyclerView.getItemAnimator();
if (animator instanceof SimpleItemAnimator) {
((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
}






share|improve this answer





















  • 3





    @sabeer still same issue. It is not resolving the issue.

    – iDroid Explorer
    Mar 22 '16 at 3:51






  • 3





    @delive let me know if you found any solution to this

    – iDroid Explorer
    Mar 22 '16 at 3:51











  • I'm use picasso, its something, not appear blink.

    – delive
    Mar 22 '16 at 8:05











  • great its working fine.

    – RAHULRSANNIDHI
    Aug 17 '16 at 9:21






  • 3





    Kotlin: (recyclerView.itemAnimator as? SimpleItemAnimator)?.supportsChangeAnimations = false

    – Pedro Paulo Amorim
    Dec 7 '16 at 15:20



















34














This simply worked:



recyclerView.getItemAnimator().setChangeDuration(0);





share|improve this answer



















  • 1





    Worked like a charm! thanks

    – Alireza
    Jun 29 '16 at 11:36











  • it's a good alternative to code ItemAnimator animator = recyclerView.getItemAnimator(); if (animator instanceof SimpleItemAnimator) { ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false); } code

    – ziniestro
    Sep 14 '16 at 2:40













  • stops all the animations ADD and REMOVE

    – MBH
    Aug 4 '17 at 23:23



















8














I have the same issue loading image from some urls and then imageView blinks.
Solved by using



notifyItemRangeInserted()    


instead of



notifyDataSetChanged()


which avoids to reload those unchanged old datas.






share|improve this answer

































    7














    try this to disable the default animation



    ItemAnimator animator = recyclerView.getItemAnimator();

    if (animator instanceof SimpleItemAnimator) {
    ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
    }


    this the new way to disable the animation since android support 23



    this old way will work for older version of the support library



    recyclerView.getItemAnimator().setSupportsChangeAnimations(false)





    share|improve this answer































      2














      Assuming mItems is the collection that backs your Adapter, why are you removing everything and re-adding? You are basically telling it that everything has changed, so RecyclerView rebinds all views than I assume the Image library does not handle it properly where it still resets the View even though it is the same image url. Maybe they had some baked in solution for AdapterView so that it works fine in GridView.



      Instead of calling notifyDataSetChanged which will cause re-binding all views, call granular notify events (notify added/removed/moved/updated) so that RecyclerView will rebind only necessary views and nothing will flicker.






      share|improve this answer





















      • 3





        Or maybe it is just a "bug" in RecyclerView? Obviously if it worked fine for last 6 years with AbsListView and now it doesn't with RecyclerView, means something is not OK with RecyclerView, right? :) Quick look into it shows that when you refresh data in ListView and GridView they keep track of view+position, so when you refresh you will get exactly the same viewholder. While RecyclerView shuffles view holders, which leads in flickering.

        – vovkab
        May 20 '15 at 17:09













      • Working on ListView does not mean it is correct for RecyclerView. These components have different architectures.

        – yigit
        May 20 '15 at 19:27






      • 1





        Agree, but sometimes it is really hard to know what items is changed, for example if you use cursors or you just refresh you whole data. So recyclerview should handle this case correctly too.

        – vovkab
        May 20 '15 at 20:58



















      1














      Hey @Ali it might be late replay. I also faced this issue and solved with below solution, it may help you please check.



      LruBitmapCache.java class is created to get image cache size



      import android.graphics.Bitmap;
      import android.support.v4.util.LruCache;
      import com.android.volley.toolbox.ImageLoader.ImageCache;

      public class LruBitmapCache extends LruCache<String, Bitmap> implements
      ImageCache {
      public static int getDefaultLruCacheSize() {
      final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
      final int cacheSize = maxMemory / 8;

      return cacheSize;
      }

      public LruBitmapCache() {
      this(getDefaultLruCacheSize());
      }

      public LruBitmapCache(int sizeInKiloBytes) {
      super(sizeInKiloBytes);
      }

      @Override
      protected int sizeOf(String key, Bitmap value) {
      return value.getRowBytes() * value.getHeight() / 1024;
      }

      @Override
      public Bitmap getBitmap(String url) {
      return get(url);
      }

      @Override
      public void putBitmap(String url, Bitmap bitmap) {
      put(url, bitmap);
      }
      }


      VolleyClient.java singleton class [extends Application] added below code



      in VolleyClient singleton class constructor add below snippet to initialize the ImageLoader



      private VolleyClient(Context context)
      {
      mCtx = context;
      mRequestQueue = getRequestQueue();
      mImageLoader = new ImageLoader(mRequestQueue,getLruBitmapCache());
      }


      I created getLruBitmapCache() method to return LruBitmapCache



      public LruBitmapCache getLruBitmapCache() {
      if (mLruBitmapCache == null)
      mLruBitmapCache = new LruBitmapCache();
      return this.mLruBitmapCache;
      }


      Hope its going to help you.






      share|improve this answer


























      • Thanks for your answer. That's what I have exactly done in my VollyClient.java. Take a look at :VolleyClient.java

        – Ali
        Jun 20 '15 at 12:25













      • Just check once with using LruCache<String, Bitmap> class, I think its going to solve your problem. Take a look at LruCache

        – Android learner
        Jun 20 '15 at 14:55











      • Did you check once the code that I shared with you in comment? what do you have in your class that I missed there?

        – Ali
        Jun 20 '15 at 15:04











      • You are missing extending LruCache<String, Bitmap> class and overriding sizeOf() method like how I done, remaining all are seems okay to me.

        – Android learner
        Jun 20 '15 at 15:11











      • Ok, I give it a try very soon, but could you explain me what have you done there which did the magic for you and solve the problem? sourcecode For me it sounds like your overriden sizeOf method should be in the source code.

        – Ali
        Jun 20 '15 at 16:48



















      1














      Recyclerview uses DefaultItemAnimator as it's default animator.
      As you can see from the code below, they change the alpha of the view holder upon item change:



      @Override
      public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromX, int fromY, int toX, int toY) {
      ...
      final float prevAlpha = ViewCompat.getAlpha(oldHolder.itemView);
      ...
      ViewCompat.setAlpha(oldHolder.itemView, prevAlpha);
      if (newHolder != null) {
      ....
      ViewCompat.setAlpha(newHolder.itemView, 0);
      }
      ...
      return true;
      }


      I wanted to retain the rest of the animations but remove the "flicker" so I cloned DefaultItemAnimator and removed the 3 alpha lines above.



      To use the new animator just call setItemAnimator() on your RecyclerView:



      mRecyclerView.setItemAnimator(new MyItemAnimator());





      share|improve this answer































        0














        I had similar issue and this worked for me
        You can call this method to set size for image cache



        private int getCacheSize(Context context) {

        final DisplayMetrics displayMetrics = context.getResources().
        getDisplayMetrics();
        final int screenWidth = displayMetrics.widthPixels;
        final int screenHeight = displayMetrics.heightPixels;
        // 4 bytes per pixel
        final int screenBytes = screenWidth * screenHeight * 4;

        return screenBytes * 3;
        }





        share|improve this answer

































          0














          for my application, I had some data changing but I didn't want the entire view to blink.



          I solved it by only fading the oldview down 0.5 alpha and starting the newview alpha at 0.5. This created a softer fading transition without making the view disappear completely.



          Unfortunately because of private implementations, I couldn't subclass the DefaultItemAnimator in order to make this change so I had to clone the code and make the following changes



          in animateChange:



          ViewCompat.setAlpha(newHolder.itemView, 0);  //change 0 to 0.5f


          in animateChangeImpl:



          oldViewAnim.alpha(0).setListener(new VpaListenerAdapter() { //change 0 to 0.5f





          share|improve this answer

































            0














            for me recyclerView.setHasFixedSize(true); worked






            share|improve this answer































              0














              Using appropriate recyclerview methods to update views will solve this issue



              First, make changes in the list



              mList.add(item);
              or mList.addAll(itemList);
              or mList.remove(index);


              Then notify using



              notifyItemInserted(addedItemIndex);
              or
              notifyItemRemoved(removedItemIndex);
              or
              notifyItemRangeChanged(fromIndex, newUpdatedItemCount);


              Hope this will help!!






              share|improve this answer


























              • Absolutely not. If you are making several updates by seconds (BLE scanning in my case) it doesn't work at all. I spent one day to update to this shit RecyclerAdapter... Better to keep ArrayAdapter. It's a shame that's not using MVC pattern, but at least it's almost usable.

                – Gojir4
                Jun 4 '18 at 15:01











              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29331075%2frecyclerview-blinking-after-notifydatasetchanged%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              12 Answers
              12






              active

              oldest

              votes








              12 Answers
              12






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              95














              Try using stable IDs in your RecyclerView.Adapter



              setHasStableIds(true) and override getItemId(int position).



              Without stable IDs, after notifyDataSetChanged(), ViewHolders usually assigned to not to same positions. That was the reason of blinking in my case.



              You can find a good explanation here.






              share|improve this answer





















              • 3





                works perfectly. freaking awesome

                – Ajay Shrestha
                Aug 30 '16 at 20:42






              • 3





                This is the most correct answer

                – Daniel López Lacalle
                Sep 27 '16 at 12:43











              • prefect solution

                – Naveen Kumar M
                Oct 28 '16 at 8:38











              • this should be marked as the right answer

                – Jignesh Shah
                Dec 21 '16 at 12:18






              • 2





                Any idea on how should we generate the ID?

                – Mauker
                Jul 25 '17 at 16:34
















              95














              Try using stable IDs in your RecyclerView.Adapter



              setHasStableIds(true) and override getItemId(int position).



              Without stable IDs, after notifyDataSetChanged(), ViewHolders usually assigned to not to same positions. That was the reason of blinking in my case.



              You can find a good explanation here.






              share|improve this answer





















              • 3





                works perfectly. freaking awesome

                – Ajay Shrestha
                Aug 30 '16 at 20:42






              • 3





                This is the most correct answer

                – Daniel López Lacalle
                Sep 27 '16 at 12:43











              • prefect solution

                – Naveen Kumar M
                Oct 28 '16 at 8:38











              • this should be marked as the right answer

                – Jignesh Shah
                Dec 21 '16 at 12:18






              • 2





                Any idea on how should we generate the ID?

                – Mauker
                Jul 25 '17 at 16:34














              95












              95








              95







              Try using stable IDs in your RecyclerView.Adapter



              setHasStableIds(true) and override getItemId(int position).



              Without stable IDs, after notifyDataSetChanged(), ViewHolders usually assigned to not to same positions. That was the reason of blinking in my case.



              You can find a good explanation here.






              share|improve this answer















              Try using stable IDs in your RecyclerView.Adapter



              setHasStableIds(true) and override getItemId(int position).



              Without stable IDs, after notifyDataSetChanged(), ViewHolders usually assigned to not to same positions. That was the reason of blinking in my case.



              You can find a good explanation here.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jul 5 '18 at 21:19









              Spipau

              1,8711931




              1,8711931










              answered Sep 9 '15 at 19:53









              Anatoly VdovichevAnatoly Vdovichev

              94964




              94964








              • 3





                works perfectly. freaking awesome

                – Ajay Shrestha
                Aug 30 '16 at 20:42






              • 3





                This is the most correct answer

                – Daniel López Lacalle
                Sep 27 '16 at 12:43











              • prefect solution

                – Naveen Kumar M
                Oct 28 '16 at 8:38











              • this should be marked as the right answer

                – Jignesh Shah
                Dec 21 '16 at 12:18






              • 2





                Any idea on how should we generate the ID?

                – Mauker
                Jul 25 '17 at 16:34














              • 3





                works perfectly. freaking awesome

                – Ajay Shrestha
                Aug 30 '16 at 20:42






              • 3





                This is the most correct answer

                – Daniel López Lacalle
                Sep 27 '16 at 12:43











              • prefect solution

                – Naveen Kumar M
                Oct 28 '16 at 8:38











              • this should be marked as the right answer

                – Jignesh Shah
                Dec 21 '16 at 12:18






              • 2





                Any idea on how should we generate the ID?

                – Mauker
                Jul 25 '17 at 16:34








              3




              3





              works perfectly. freaking awesome

              – Ajay Shrestha
              Aug 30 '16 at 20:42





              works perfectly. freaking awesome

              – Ajay Shrestha
              Aug 30 '16 at 20:42




              3




              3





              This is the most correct answer

              – Daniel López Lacalle
              Sep 27 '16 at 12:43





              This is the most correct answer

              – Daniel López Lacalle
              Sep 27 '16 at 12:43













              prefect solution

              – Naveen Kumar M
              Oct 28 '16 at 8:38





              prefect solution

              – Naveen Kumar M
              Oct 28 '16 at 8:38













              this should be marked as the right answer

              – Jignesh Shah
              Dec 21 '16 at 12:18





              this should be marked as the right answer

              – Jignesh Shah
              Dec 21 '16 at 12:18




              2




              2





              Any idea on how should we generate the ID?

              – Mauker
              Jul 25 '17 at 16:34





              Any idea on how should we generate the ID?

              – Mauker
              Jul 25 '17 at 16:34













              81














              According to this issue page ....it is the default recycleview item change animation... You can turn it off.. try this



              recyclerView.getItemAnimator().setSupportsChangeAnimations(false);


              Change in latest version



              Quoted from Android developer blog:




              Note that this new API is not backward compatible. If you previously
              implemented an ItemAnimator, you can instead extend
              SimpleItemAnimator, which provides the old API by wrapping the new
              API. You’ll also notice that some methods have been entirely removed
              from ItemAnimator. For example, if you were calling
              recyclerView.getItemAnimator().setSupportsChangeAnimations(false),
              this code won’t compile anymore. You can replace it with:



              ItemAnimator animator = recyclerView.getItemAnimator();
              if (animator instanceof SimpleItemAnimator) {
              ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
              }






              share|improve this answer





















              • 3





                @sabeer still same issue. It is not resolving the issue.

                – iDroid Explorer
                Mar 22 '16 at 3:51






              • 3





                @delive let me know if you found any solution to this

                – iDroid Explorer
                Mar 22 '16 at 3:51











              • I'm use picasso, its something, not appear blink.

                – delive
                Mar 22 '16 at 8:05











              • great its working fine.

                – RAHULRSANNIDHI
                Aug 17 '16 at 9:21






              • 3





                Kotlin: (recyclerView.itemAnimator as? SimpleItemAnimator)?.supportsChangeAnimations = false

                – Pedro Paulo Amorim
                Dec 7 '16 at 15:20
















              81














              According to this issue page ....it is the default recycleview item change animation... You can turn it off.. try this



              recyclerView.getItemAnimator().setSupportsChangeAnimations(false);


              Change in latest version



              Quoted from Android developer blog:




              Note that this new API is not backward compatible. If you previously
              implemented an ItemAnimator, you can instead extend
              SimpleItemAnimator, which provides the old API by wrapping the new
              API. You’ll also notice that some methods have been entirely removed
              from ItemAnimator. For example, if you were calling
              recyclerView.getItemAnimator().setSupportsChangeAnimations(false),
              this code won’t compile anymore. You can replace it with:



              ItemAnimator animator = recyclerView.getItemAnimator();
              if (animator instanceof SimpleItemAnimator) {
              ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
              }






              share|improve this answer





















              • 3





                @sabeer still same issue. It is not resolving the issue.

                – iDroid Explorer
                Mar 22 '16 at 3:51






              • 3





                @delive let me know if you found any solution to this

                – iDroid Explorer
                Mar 22 '16 at 3:51











              • I'm use picasso, its something, not appear blink.

                – delive
                Mar 22 '16 at 8:05











              • great its working fine.

                – RAHULRSANNIDHI
                Aug 17 '16 at 9:21






              • 3





                Kotlin: (recyclerView.itemAnimator as? SimpleItemAnimator)?.supportsChangeAnimations = false

                – Pedro Paulo Amorim
                Dec 7 '16 at 15:20














              81












              81








              81







              According to this issue page ....it is the default recycleview item change animation... You can turn it off.. try this



              recyclerView.getItemAnimator().setSupportsChangeAnimations(false);


              Change in latest version



              Quoted from Android developer blog:




              Note that this new API is not backward compatible. If you previously
              implemented an ItemAnimator, you can instead extend
              SimpleItemAnimator, which provides the old API by wrapping the new
              API. You’ll also notice that some methods have been entirely removed
              from ItemAnimator. For example, if you were calling
              recyclerView.getItemAnimator().setSupportsChangeAnimations(false),
              this code won’t compile anymore. You can replace it with:



              ItemAnimator animator = recyclerView.getItemAnimator();
              if (animator instanceof SimpleItemAnimator) {
              ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
              }






              share|improve this answer















              According to this issue page ....it is the default recycleview item change animation... You can turn it off.. try this



              recyclerView.getItemAnimator().setSupportsChangeAnimations(false);


              Change in latest version



              Quoted from Android developer blog:




              Note that this new API is not backward compatible. If you previously
              implemented an ItemAnimator, you can instead extend
              SimpleItemAnimator, which provides the old API by wrapping the new
              API. You’ll also notice that some methods have been entirely removed
              from ItemAnimator. For example, if you were calling
              recyclerView.getItemAnimator().setSupportsChangeAnimations(false),
              this code won’t compile anymore. You can replace it with:



              ItemAnimator animator = recyclerView.getItemAnimator();
              if (animator instanceof SimpleItemAnimator) {
              ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
              }







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Oct 21 '16 at 13:04









              Sufian

              4,83473699




              4,83473699










              answered Aug 26 '15 at 12:57









              Sabeer MohammedSabeer Mohammed

              2,7321717




              2,7321717








              • 3





                @sabeer still same issue. It is not resolving the issue.

                – iDroid Explorer
                Mar 22 '16 at 3:51






              • 3





                @delive let me know if you found any solution to this

                – iDroid Explorer
                Mar 22 '16 at 3:51











              • I'm use picasso, its something, not appear blink.

                – delive
                Mar 22 '16 at 8:05











              • great its working fine.

                – RAHULRSANNIDHI
                Aug 17 '16 at 9:21






              • 3





                Kotlin: (recyclerView.itemAnimator as? SimpleItemAnimator)?.supportsChangeAnimations = false

                – Pedro Paulo Amorim
                Dec 7 '16 at 15:20














              • 3





                @sabeer still same issue. It is not resolving the issue.

                – iDroid Explorer
                Mar 22 '16 at 3:51






              • 3





                @delive let me know if you found any solution to this

                – iDroid Explorer
                Mar 22 '16 at 3:51











              • I'm use picasso, its something, not appear blink.

                – delive
                Mar 22 '16 at 8:05











              • great its working fine.

                – RAHULRSANNIDHI
                Aug 17 '16 at 9:21






              • 3





                Kotlin: (recyclerView.itemAnimator as? SimpleItemAnimator)?.supportsChangeAnimations = false

                – Pedro Paulo Amorim
                Dec 7 '16 at 15:20








              3




              3





              @sabeer still same issue. It is not resolving the issue.

              – iDroid Explorer
              Mar 22 '16 at 3:51





              @sabeer still same issue. It is not resolving the issue.

              – iDroid Explorer
              Mar 22 '16 at 3:51




              3




              3





              @delive let me know if you found any solution to this

              – iDroid Explorer
              Mar 22 '16 at 3:51





              @delive let me know if you found any solution to this

              – iDroid Explorer
              Mar 22 '16 at 3:51













              I'm use picasso, its something, not appear blink.

              – delive
              Mar 22 '16 at 8:05





              I'm use picasso, its something, not appear blink.

              – delive
              Mar 22 '16 at 8:05













              great its working fine.

              – RAHULRSANNIDHI
              Aug 17 '16 at 9:21





              great its working fine.

              – RAHULRSANNIDHI
              Aug 17 '16 at 9:21




              3




              3





              Kotlin: (recyclerView.itemAnimator as? SimpleItemAnimator)?.supportsChangeAnimations = false

              – Pedro Paulo Amorim
              Dec 7 '16 at 15:20





              Kotlin: (recyclerView.itemAnimator as? SimpleItemAnimator)?.supportsChangeAnimations = false

              – Pedro Paulo Amorim
              Dec 7 '16 at 15:20











              34














              This simply worked:



              recyclerView.getItemAnimator().setChangeDuration(0);





              share|improve this answer



















              • 1





                Worked like a charm! thanks

                – Alireza
                Jun 29 '16 at 11:36











              • it's a good alternative to code ItemAnimator animator = recyclerView.getItemAnimator(); if (animator instanceof SimpleItemAnimator) { ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false); } code

                – ziniestro
                Sep 14 '16 at 2:40













              • stops all the animations ADD and REMOVE

                – MBH
                Aug 4 '17 at 23:23
















              34














              This simply worked:



              recyclerView.getItemAnimator().setChangeDuration(0);





              share|improve this answer



















              • 1





                Worked like a charm! thanks

                – Alireza
                Jun 29 '16 at 11:36











              • it's a good alternative to code ItemAnimator animator = recyclerView.getItemAnimator(); if (animator instanceof SimpleItemAnimator) { ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false); } code

                – ziniestro
                Sep 14 '16 at 2:40













              • stops all the animations ADD and REMOVE

                – MBH
                Aug 4 '17 at 23:23














              34












              34








              34







              This simply worked:



              recyclerView.getItemAnimator().setChangeDuration(0);





              share|improve this answer













              This simply worked:



              recyclerView.getItemAnimator().setChangeDuration(0);






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jan 19 '16 at 14:25









              Hamzeh SobohHamzeh Soboh

              4,47052950




              4,47052950








              • 1





                Worked like a charm! thanks

                – Alireza
                Jun 29 '16 at 11:36











              • it's a good alternative to code ItemAnimator animator = recyclerView.getItemAnimator(); if (animator instanceof SimpleItemAnimator) { ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false); } code

                – ziniestro
                Sep 14 '16 at 2:40













              • stops all the animations ADD and REMOVE

                – MBH
                Aug 4 '17 at 23:23














              • 1





                Worked like a charm! thanks

                – Alireza
                Jun 29 '16 at 11:36











              • it's a good alternative to code ItemAnimator animator = recyclerView.getItemAnimator(); if (animator instanceof SimpleItemAnimator) { ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false); } code

                – ziniestro
                Sep 14 '16 at 2:40













              • stops all the animations ADD and REMOVE

                – MBH
                Aug 4 '17 at 23:23








              1




              1





              Worked like a charm! thanks

              – Alireza
              Jun 29 '16 at 11:36





              Worked like a charm! thanks

              – Alireza
              Jun 29 '16 at 11:36













              it's a good alternative to code ItemAnimator animator = recyclerView.getItemAnimator(); if (animator instanceof SimpleItemAnimator) { ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false); } code

              – ziniestro
              Sep 14 '16 at 2:40







              it's a good alternative to code ItemAnimator animator = recyclerView.getItemAnimator(); if (animator instanceof SimpleItemAnimator) { ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false); } code

              – ziniestro
              Sep 14 '16 at 2:40















              stops all the animations ADD and REMOVE

              – MBH
              Aug 4 '17 at 23:23





              stops all the animations ADD and REMOVE

              – MBH
              Aug 4 '17 at 23:23











              8














              I have the same issue loading image from some urls and then imageView blinks.
              Solved by using



              notifyItemRangeInserted()    


              instead of



              notifyDataSetChanged()


              which avoids to reload those unchanged old datas.






              share|improve this answer






























                8














                I have the same issue loading image from some urls and then imageView blinks.
                Solved by using



                notifyItemRangeInserted()    


                instead of



                notifyDataSetChanged()


                which avoids to reload those unchanged old datas.






                share|improve this answer




























                  8












                  8








                  8







                  I have the same issue loading image from some urls and then imageView blinks.
                  Solved by using



                  notifyItemRangeInserted()    


                  instead of



                  notifyDataSetChanged()


                  which avoids to reload those unchanged old datas.






                  share|improve this answer















                  I have the same issue loading image from some urls and then imageView blinks.
                  Solved by using



                  notifyItemRangeInserted()    


                  instead of



                  notifyDataSetChanged()


                  which avoids to reload those unchanged old datas.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Aug 30 '18 at 1:36

























                  answered Sep 17 '16 at 4:37









                  WeselyWesely

                  388314




                  388314























                      7














                      try this to disable the default animation



                      ItemAnimator animator = recyclerView.getItemAnimator();

                      if (animator instanceof SimpleItemAnimator) {
                      ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
                      }


                      this the new way to disable the animation since android support 23



                      this old way will work for older version of the support library



                      recyclerView.getItemAnimator().setSupportsChangeAnimations(false)





                      share|improve this answer




























                        7














                        try this to disable the default animation



                        ItemAnimator animator = recyclerView.getItemAnimator();

                        if (animator instanceof SimpleItemAnimator) {
                        ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
                        }


                        this the new way to disable the animation since android support 23



                        this old way will work for older version of the support library



                        recyclerView.getItemAnimator().setSupportsChangeAnimations(false)





                        share|improve this answer


























                          7












                          7








                          7







                          try this to disable the default animation



                          ItemAnimator animator = recyclerView.getItemAnimator();

                          if (animator instanceof SimpleItemAnimator) {
                          ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
                          }


                          this the new way to disable the animation since android support 23



                          this old way will work for older version of the support library



                          recyclerView.getItemAnimator().setSupportsChangeAnimations(false)





                          share|improve this answer













                          try this to disable the default animation



                          ItemAnimator animator = recyclerView.getItemAnimator();

                          if (animator instanceof SimpleItemAnimator) {
                          ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
                          }


                          this the new way to disable the animation since android support 23



                          this old way will work for older version of the support library



                          recyclerView.getItemAnimator().setSupportsChangeAnimations(false)






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 22 '15 at 19:31









                          Mohamed FaroukMohamed Farouk

                          12622




                          12622























                              2














                              Assuming mItems is the collection that backs your Adapter, why are you removing everything and re-adding? You are basically telling it that everything has changed, so RecyclerView rebinds all views than I assume the Image library does not handle it properly where it still resets the View even though it is the same image url. Maybe they had some baked in solution for AdapterView so that it works fine in GridView.



                              Instead of calling notifyDataSetChanged which will cause re-binding all views, call granular notify events (notify added/removed/moved/updated) so that RecyclerView will rebind only necessary views and nothing will flicker.






                              share|improve this answer





















                              • 3





                                Or maybe it is just a "bug" in RecyclerView? Obviously if it worked fine for last 6 years with AbsListView and now it doesn't with RecyclerView, means something is not OK with RecyclerView, right? :) Quick look into it shows that when you refresh data in ListView and GridView they keep track of view+position, so when you refresh you will get exactly the same viewholder. While RecyclerView shuffles view holders, which leads in flickering.

                                – vovkab
                                May 20 '15 at 17:09













                              • Working on ListView does not mean it is correct for RecyclerView. These components have different architectures.

                                – yigit
                                May 20 '15 at 19:27






                              • 1





                                Agree, but sometimes it is really hard to know what items is changed, for example if you use cursors or you just refresh you whole data. So recyclerview should handle this case correctly too.

                                – vovkab
                                May 20 '15 at 20:58
















                              2














                              Assuming mItems is the collection that backs your Adapter, why are you removing everything and re-adding? You are basically telling it that everything has changed, so RecyclerView rebinds all views than I assume the Image library does not handle it properly where it still resets the View even though it is the same image url. Maybe they had some baked in solution for AdapterView so that it works fine in GridView.



                              Instead of calling notifyDataSetChanged which will cause re-binding all views, call granular notify events (notify added/removed/moved/updated) so that RecyclerView will rebind only necessary views and nothing will flicker.






                              share|improve this answer





















                              • 3





                                Or maybe it is just a "bug" in RecyclerView? Obviously if it worked fine for last 6 years with AbsListView and now it doesn't with RecyclerView, means something is not OK with RecyclerView, right? :) Quick look into it shows that when you refresh data in ListView and GridView they keep track of view+position, so when you refresh you will get exactly the same viewholder. While RecyclerView shuffles view holders, which leads in flickering.

                                – vovkab
                                May 20 '15 at 17:09













                              • Working on ListView does not mean it is correct for RecyclerView. These components have different architectures.

                                – yigit
                                May 20 '15 at 19:27






                              • 1





                                Agree, but sometimes it is really hard to know what items is changed, for example if you use cursors or you just refresh you whole data. So recyclerview should handle this case correctly too.

                                – vovkab
                                May 20 '15 at 20:58














                              2












                              2








                              2







                              Assuming mItems is the collection that backs your Adapter, why are you removing everything and re-adding? You are basically telling it that everything has changed, so RecyclerView rebinds all views than I assume the Image library does not handle it properly where it still resets the View even though it is the same image url. Maybe they had some baked in solution for AdapterView so that it works fine in GridView.



                              Instead of calling notifyDataSetChanged which will cause re-binding all views, call granular notify events (notify added/removed/moved/updated) so that RecyclerView will rebind only necessary views and nothing will flicker.






                              share|improve this answer















                              Assuming mItems is the collection that backs your Adapter, why are you removing everything and re-adding? You are basically telling it that everything has changed, so RecyclerView rebinds all views than I assume the Image library does not handle it properly where it still resets the View even though it is the same image url. Maybe they had some baked in solution for AdapterView so that it works fine in GridView.



                              Instead of calling notifyDataSetChanged which will cause re-binding all views, call granular notify events (notify added/removed/moved/updated) so that RecyclerView will rebind only necessary views and nothing will flicker.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Mar 30 '15 at 8:35









                              Ali

                              4,6331650114




                              4,6331650114










                              answered Mar 30 '15 at 4:33









                              yigityigit

                              24.4k75753




                              24.4k75753








                              • 3





                                Or maybe it is just a "bug" in RecyclerView? Obviously if it worked fine for last 6 years with AbsListView and now it doesn't with RecyclerView, means something is not OK with RecyclerView, right? :) Quick look into it shows that when you refresh data in ListView and GridView they keep track of view+position, so when you refresh you will get exactly the same viewholder. While RecyclerView shuffles view holders, which leads in flickering.

                                – vovkab
                                May 20 '15 at 17:09













                              • Working on ListView does not mean it is correct for RecyclerView. These components have different architectures.

                                – yigit
                                May 20 '15 at 19:27






                              • 1





                                Agree, but sometimes it is really hard to know what items is changed, for example if you use cursors or you just refresh you whole data. So recyclerview should handle this case correctly too.

                                – vovkab
                                May 20 '15 at 20:58














                              • 3





                                Or maybe it is just a "bug" in RecyclerView? Obviously if it worked fine for last 6 years with AbsListView and now it doesn't with RecyclerView, means something is not OK with RecyclerView, right? :) Quick look into it shows that when you refresh data in ListView and GridView they keep track of view+position, so when you refresh you will get exactly the same viewholder. While RecyclerView shuffles view holders, which leads in flickering.

                                – vovkab
                                May 20 '15 at 17:09













                              • Working on ListView does not mean it is correct for RecyclerView. These components have different architectures.

                                – yigit
                                May 20 '15 at 19:27






                              • 1





                                Agree, but sometimes it is really hard to know what items is changed, for example if you use cursors or you just refresh you whole data. So recyclerview should handle this case correctly too.

                                – vovkab
                                May 20 '15 at 20:58








                              3




                              3





                              Or maybe it is just a "bug" in RecyclerView? Obviously if it worked fine for last 6 years with AbsListView and now it doesn't with RecyclerView, means something is not OK with RecyclerView, right? :) Quick look into it shows that when you refresh data in ListView and GridView they keep track of view+position, so when you refresh you will get exactly the same viewholder. While RecyclerView shuffles view holders, which leads in flickering.

                              – vovkab
                              May 20 '15 at 17:09







                              Or maybe it is just a "bug" in RecyclerView? Obviously if it worked fine for last 6 years with AbsListView and now it doesn't with RecyclerView, means something is not OK with RecyclerView, right? :) Quick look into it shows that when you refresh data in ListView and GridView they keep track of view+position, so when you refresh you will get exactly the same viewholder. While RecyclerView shuffles view holders, which leads in flickering.

                              – vovkab
                              May 20 '15 at 17:09















                              Working on ListView does not mean it is correct for RecyclerView. These components have different architectures.

                              – yigit
                              May 20 '15 at 19:27





                              Working on ListView does not mean it is correct for RecyclerView. These components have different architectures.

                              – yigit
                              May 20 '15 at 19:27




                              1




                              1





                              Agree, but sometimes it is really hard to know what items is changed, for example if you use cursors or you just refresh you whole data. So recyclerview should handle this case correctly too.

                              – vovkab
                              May 20 '15 at 20:58





                              Agree, but sometimes it is really hard to know what items is changed, for example if you use cursors or you just refresh you whole data. So recyclerview should handle this case correctly too.

                              – vovkab
                              May 20 '15 at 20:58











                              1














                              Hey @Ali it might be late replay. I also faced this issue and solved with below solution, it may help you please check.



                              LruBitmapCache.java class is created to get image cache size



                              import android.graphics.Bitmap;
                              import android.support.v4.util.LruCache;
                              import com.android.volley.toolbox.ImageLoader.ImageCache;

                              public class LruBitmapCache extends LruCache<String, Bitmap> implements
                              ImageCache {
                              public static int getDefaultLruCacheSize() {
                              final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
                              final int cacheSize = maxMemory / 8;

                              return cacheSize;
                              }

                              public LruBitmapCache() {
                              this(getDefaultLruCacheSize());
                              }

                              public LruBitmapCache(int sizeInKiloBytes) {
                              super(sizeInKiloBytes);
                              }

                              @Override
                              protected int sizeOf(String key, Bitmap value) {
                              return value.getRowBytes() * value.getHeight() / 1024;
                              }

                              @Override
                              public Bitmap getBitmap(String url) {
                              return get(url);
                              }

                              @Override
                              public void putBitmap(String url, Bitmap bitmap) {
                              put(url, bitmap);
                              }
                              }


                              VolleyClient.java singleton class [extends Application] added below code



                              in VolleyClient singleton class constructor add below snippet to initialize the ImageLoader



                              private VolleyClient(Context context)
                              {
                              mCtx = context;
                              mRequestQueue = getRequestQueue();
                              mImageLoader = new ImageLoader(mRequestQueue,getLruBitmapCache());
                              }


                              I created getLruBitmapCache() method to return LruBitmapCache



                              public LruBitmapCache getLruBitmapCache() {
                              if (mLruBitmapCache == null)
                              mLruBitmapCache = new LruBitmapCache();
                              return this.mLruBitmapCache;
                              }


                              Hope its going to help you.






                              share|improve this answer


























                              • Thanks for your answer. That's what I have exactly done in my VollyClient.java. Take a look at :VolleyClient.java

                                – Ali
                                Jun 20 '15 at 12:25













                              • Just check once with using LruCache<String, Bitmap> class, I think its going to solve your problem. Take a look at LruCache

                                – Android learner
                                Jun 20 '15 at 14:55











                              • Did you check once the code that I shared with you in comment? what do you have in your class that I missed there?

                                – Ali
                                Jun 20 '15 at 15:04











                              • You are missing extending LruCache<String, Bitmap> class and overriding sizeOf() method like how I done, remaining all are seems okay to me.

                                – Android learner
                                Jun 20 '15 at 15:11











                              • Ok, I give it a try very soon, but could you explain me what have you done there which did the magic for you and solve the problem? sourcecode For me it sounds like your overriden sizeOf method should be in the source code.

                                – Ali
                                Jun 20 '15 at 16:48
















                              1














                              Hey @Ali it might be late replay. I also faced this issue and solved with below solution, it may help you please check.



                              LruBitmapCache.java class is created to get image cache size



                              import android.graphics.Bitmap;
                              import android.support.v4.util.LruCache;
                              import com.android.volley.toolbox.ImageLoader.ImageCache;

                              public class LruBitmapCache extends LruCache<String, Bitmap> implements
                              ImageCache {
                              public static int getDefaultLruCacheSize() {
                              final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
                              final int cacheSize = maxMemory / 8;

                              return cacheSize;
                              }

                              public LruBitmapCache() {
                              this(getDefaultLruCacheSize());
                              }

                              public LruBitmapCache(int sizeInKiloBytes) {
                              super(sizeInKiloBytes);
                              }

                              @Override
                              protected int sizeOf(String key, Bitmap value) {
                              return value.getRowBytes() * value.getHeight() / 1024;
                              }

                              @Override
                              public Bitmap getBitmap(String url) {
                              return get(url);
                              }

                              @Override
                              public void putBitmap(String url, Bitmap bitmap) {
                              put(url, bitmap);
                              }
                              }


                              VolleyClient.java singleton class [extends Application] added below code



                              in VolleyClient singleton class constructor add below snippet to initialize the ImageLoader



                              private VolleyClient(Context context)
                              {
                              mCtx = context;
                              mRequestQueue = getRequestQueue();
                              mImageLoader = new ImageLoader(mRequestQueue,getLruBitmapCache());
                              }


                              I created getLruBitmapCache() method to return LruBitmapCache



                              public LruBitmapCache getLruBitmapCache() {
                              if (mLruBitmapCache == null)
                              mLruBitmapCache = new LruBitmapCache();
                              return this.mLruBitmapCache;
                              }


                              Hope its going to help you.






                              share|improve this answer


























                              • Thanks for your answer. That's what I have exactly done in my VollyClient.java. Take a look at :VolleyClient.java

                                – Ali
                                Jun 20 '15 at 12:25













                              • Just check once with using LruCache<String, Bitmap> class, I think its going to solve your problem. Take a look at LruCache

                                – Android learner
                                Jun 20 '15 at 14:55











                              • Did you check once the code that I shared with you in comment? what do you have in your class that I missed there?

                                – Ali
                                Jun 20 '15 at 15:04











                              • You are missing extending LruCache<String, Bitmap> class and overriding sizeOf() method like how I done, remaining all are seems okay to me.

                                – Android learner
                                Jun 20 '15 at 15:11











                              • Ok, I give it a try very soon, but could you explain me what have you done there which did the magic for you and solve the problem? sourcecode For me it sounds like your overriden sizeOf method should be in the source code.

                                – Ali
                                Jun 20 '15 at 16:48














                              1












                              1








                              1







                              Hey @Ali it might be late replay. I also faced this issue and solved with below solution, it may help you please check.



                              LruBitmapCache.java class is created to get image cache size



                              import android.graphics.Bitmap;
                              import android.support.v4.util.LruCache;
                              import com.android.volley.toolbox.ImageLoader.ImageCache;

                              public class LruBitmapCache extends LruCache<String, Bitmap> implements
                              ImageCache {
                              public static int getDefaultLruCacheSize() {
                              final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
                              final int cacheSize = maxMemory / 8;

                              return cacheSize;
                              }

                              public LruBitmapCache() {
                              this(getDefaultLruCacheSize());
                              }

                              public LruBitmapCache(int sizeInKiloBytes) {
                              super(sizeInKiloBytes);
                              }

                              @Override
                              protected int sizeOf(String key, Bitmap value) {
                              return value.getRowBytes() * value.getHeight() / 1024;
                              }

                              @Override
                              public Bitmap getBitmap(String url) {
                              return get(url);
                              }

                              @Override
                              public void putBitmap(String url, Bitmap bitmap) {
                              put(url, bitmap);
                              }
                              }


                              VolleyClient.java singleton class [extends Application] added below code



                              in VolleyClient singleton class constructor add below snippet to initialize the ImageLoader



                              private VolleyClient(Context context)
                              {
                              mCtx = context;
                              mRequestQueue = getRequestQueue();
                              mImageLoader = new ImageLoader(mRequestQueue,getLruBitmapCache());
                              }


                              I created getLruBitmapCache() method to return LruBitmapCache



                              public LruBitmapCache getLruBitmapCache() {
                              if (mLruBitmapCache == null)
                              mLruBitmapCache = new LruBitmapCache();
                              return this.mLruBitmapCache;
                              }


                              Hope its going to help you.






                              share|improve this answer















                              Hey @Ali it might be late replay. I also faced this issue and solved with below solution, it may help you please check.



                              LruBitmapCache.java class is created to get image cache size



                              import android.graphics.Bitmap;
                              import android.support.v4.util.LruCache;
                              import com.android.volley.toolbox.ImageLoader.ImageCache;

                              public class LruBitmapCache extends LruCache<String, Bitmap> implements
                              ImageCache {
                              public static int getDefaultLruCacheSize() {
                              final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
                              final int cacheSize = maxMemory / 8;

                              return cacheSize;
                              }

                              public LruBitmapCache() {
                              this(getDefaultLruCacheSize());
                              }

                              public LruBitmapCache(int sizeInKiloBytes) {
                              super(sizeInKiloBytes);
                              }

                              @Override
                              protected int sizeOf(String key, Bitmap value) {
                              return value.getRowBytes() * value.getHeight() / 1024;
                              }

                              @Override
                              public Bitmap getBitmap(String url) {
                              return get(url);
                              }

                              @Override
                              public void putBitmap(String url, Bitmap bitmap) {
                              put(url, bitmap);
                              }
                              }


                              VolleyClient.java singleton class [extends Application] added below code



                              in VolleyClient singleton class constructor add below snippet to initialize the ImageLoader



                              private VolleyClient(Context context)
                              {
                              mCtx = context;
                              mRequestQueue = getRequestQueue();
                              mImageLoader = new ImageLoader(mRequestQueue,getLruBitmapCache());
                              }


                              I created getLruBitmapCache() method to return LruBitmapCache



                              public LruBitmapCache getLruBitmapCache() {
                              if (mLruBitmapCache == null)
                              mLruBitmapCache = new LruBitmapCache();
                              return this.mLruBitmapCache;
                              }


                              Hope its going to help you.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Jun 20 '15 at 12:20

























                              answered Jun 20 '15 at 12:10









                              Android learnerAndroid learner

                              86841834




                              86841834













                              • Thanks for your answer. That's what I have exactly done in my VollyClient.java. Take a look at :VolleyClient.java

                                – Ali
                                Jun 20 '15 at 12:25













                              • Just check once with using LruCache<String, Bitmap> class, I think its going to solve your problem. Take a look at LruCache

                                – Android learner
                                Jun 20 '15 at 14:55











                              • Did you check once the code that I shared with you in comment? what do you have in your class that I missed there?

                                – Ali
                                Jun 20 '15 at 15:04











                              • You are missing extending LruCache<String, Bitmap> class and overriding sizeOf() method like how I done, remaining all are seems okay to me.

                                – Android learner
                                Jun 20 '15 at 15:11











                              • Ok, I give it a try very soon, but could you explain me what have you done there which did the magic for you and solve the problem? sourcecode For me it sounds like your overriden sizeOf method should be in the source code.

                                – Ali
                                Jun 20 '15 at 16:48



















                              • Thanks for your answer. That's what I have exactly done in my VollyClient.java. Take a look at :VolleyClient.java

                                – Ali
                                Jun 20 '15 at 12:25













                              • Just check once with using LruCache<String, Bitmap> class, I think its going to solve your problem. Take a look at LruCache

                                – Android learner
                                Jun 20 '15 at 14:55











                              • Did you check once the code that I shared with you in comment? what do you have in your class that I missed there?

                                – Ali
                                Jun 20 '15 at 15:04











                              • You are missing extending LruCache<String, Bitmap> class and overriding sizeOf() method like how I done, remaining all are seems okay to me.

                                – Android learner
                                Jun 20 '15 at 15:11











                              • Ok, I give it a try very soon, but could you explain me what have you done there which did the magic for you and solve the problem? sourcecode For me it sounds like your overriden sizeOf method should be in the source code.

                                – Ali
                                Jun 20 '15 at 16:48

















                              Thanks for your answer. That's what I have exactly done in my VollyClient.java. Take a look at :VolleyClient.java

                              – Ali
                              Jun 20 '15 at 12:25







                              Thanks for your answer. That's what I have exactly done in my VollyClient.java. Take a look at :VolleyClient.java

                              – Ali
                              Jun 20 '15 at 12:25















                              Just check once with using LruCache<String, Bitmap> class, I think its going to solve your problem. Take a look at LruCache

                              – Android learner
                              Jun 20 '15 at 14:55





                              Just check once with using LruCache<String, Bitmap> class, I think its going to solve your problem. Take a look at LruCache

                              – Android learner
                              Jun 20 '15 at 14:55













                              Did you check once the code that I shared with you in comment? what do you have in your class that I missed there?

                              – Ali
                              Jun 20 '15 at 15:04





                              Did you check once the code that I shared with you in comment? what do you have in your class that I missed there?

                              – Ali
                              Jun 20 '15 at 15:04













                              You are missing extending LruCache<String, Bitmap> class and overriding sizeOf() method like how I done, remaining all are seems okay to me.

                              – Android learner
                              Jun 20 '15 at 15:11





                              You are missing extending LruCache<String, Bitmap> class and overriding sizeOf() method like how I done, remaining all are seems okay to me.

                              – Android learner
                              Jun 20 '15 at 15:11













                              Ok, I give it a try very soon, but could you explain me what have you done there which did the magic for you and solve the problem? sourcecode For me it sounds like your overriden sizeOf method should be in the source code.

                              – Ali
                              Jun 20 '15 at 16:48





                              Ok, I give it a try very soon, but could you explain me what have you done there which did the magic for you and solve the problem? sourcecode For me it sounds like your overriden sizeOf method should be in the source code.

                              – Ali
                              Jun 20 '15 at 16:48











                              1














                              Recyclerview uses DefaultItemAnimator as it's default animator.
                              As you can see from the code below, they change the alpha of the view holder upon item change:



                              @Override
                              public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromX, int fromY, int toX, int toY) {
                              ...
                              final float prevAlpha = ViewCompat.getAlpha(oldHolder.itemView);
                              ...
                              ViewCompat.setAlpha(oldHolder.itemView, prevAlpha);
                              if (newHolder != null) {
                              ....
                              ViewCompat.setAlpha(newHolder.itemView, 0);
                              }
                              ...
                              return true;
                              }


                              I wanted to retain the rest of the animations but remove the "flicker" so I cloned DefaultItemAnimator and removed the 3 alpha lines above.



                              To use the new animator just call setItemAnimator() on your RecyclerView:



                              mRecyclerView.setItemAnimator(new MyItemAnimator());





                              share|improve this answer




























                                1














                                Recyclerview uses DefaultItemAnimator as it's default animator.
                                As you can see from the code below, they change the alpha of the view holder upon item change:



                                @Override
                                public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromX, int fromY, int toX, int toY) {
                                ...
                                final float prevAlpha = ViewCompat.getAlpha(oldHolder.itemView);
                                ...
                                ViewCompat.setAlpha(oldHolder.itemView, prevAlpha);
                                if (newHolder != null) {
                                ....
                                ViewCompat.setAlpha(newHolder.itemView, 0);
                                }
                                ...
                                return true;
                                }


                                I wanted to retain the rest of the animations but remove the "flicker" so I cloned DefaultItemAnimator and removed the 3 alpha lines above.



                                To use the new animator just call setItemAnimator() on your RecyclerView:



                                mRecyclerView.setItemAnimator(new MyItemAnimator());





                                share|improve this answer


























                                  1












                                  1








                                  1







                                  Recyclerview uses DefaultItemAnimator as it's default animator.
                                  As you can see from the code below, they change the alpha of the view holder upon item change:



                                  @Override
                                  public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromX, int fromY, int toX, int toY) {
                                  ...
                                  final float prevAlpha = ViewCompat.getAlpha(oldHolder.itemView);
                                  ...
                                  ViewCompat.setAlpha(oldHolder.itemView, prevAlpha);
                                  if (newHolder != null) {
                                  ....
                                  ViewCompat.setAlpha(newHolder.itemView, 0);
                                  }
                                  ...
                                  return true;
                                  }


                                  I wanted to retain the rest of the animations but remove the "flicker" so I cloned DefaultItemAnimator and removed the 3 alpha lines above.



                                  To use the new animator just call setItemAnimator() on your RecyclerView:



                                  mRecyclerView.setItemAnimator(new MyItemAnimator());





                                  share|improve this answer













                                  Recyclerview uses DefaultItemAnimator as it's default animator.
                                  As you can see from the code below, they change the alpha of the view holder upon item change:



                                  @Override
                                  public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromX, int fromY, int toX, int toY) {
                                  ...
                                  final float prevAlpha = ViewCompat.getAlpha(oldHolder.itemView);
                                  ...
                                  ViewCompat.setAlpha(oldHolder.itemView, prevAlpha);
                                  if (newHolder != null) {
                                  ....
                                  ViewCompat.setAlpha(newHolder.itemView, 0);
                                  }
                                  ...
                                  return true;
                                  }


                                  I wanted to retain the rest of the animations but remove the "flicker" so I cloned DefaultItemAnimator and removed the 3 alpha lines above.



                                  To use the new animator just call setItemAnimator() on your RecyclerView:



                                  mRecyclerView.setItemAnimator(new MyItemAnimator());






                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Jun 29 '16 at 0:19









                                  Peter FilePeter File

                                  451515




                                  451515























                                      0














                                      I had similar issue and this worked for me
                                      You can call this method to set size for image cache



                                      private int getCacheSize(Context context) {

                                      final DisplayMetrics displayMetrics = context.getResources().
                                      getDisplayMetrics();
                                      final int screenWidth = displayMetrics.widthPixels;
                                      final int screenHeight = displayMetrics.heightPixels;
                                      // 4 bytes per pixel
                                      final int screenBytes = screenWidth * screenHeight * 4;

                                      return screenBytes * 3;
                                      }





                                      share|improve this answer






























                                        0














                                        I had similar issue and this worked for me
                                        You can call this method to set size for image cache



                                        private int getCacheSize(Context context) {

                                        final DisplayMetrics displayMetrics = context.getResources().
                                        getDisplayMetrics();
                                        final int screenWidth = displayMetrics.widthPixels;
                                        final int screenHeight = displayMetrics.heightPixels;
                                        // 4 bytes per pixel
                                        final int screenBytes = screenWidth * screenHeight * 4;

                                        return screenBytes * 3;
                                        }





                                        share|improve this answer




























                                          0












                                          0








                                          0







                                          I had similar issue and this worked for me
                                          You can call this method to set size for image cache



                                          private int getCacheSize(Context context) {

                                          final DisplayMetrics displayMetrics = context.getResources().
                                          getDisplayMetrics();
                                          final int screenWidth = displayMetrics.widthPixels;
                                          final int screenHeight = displayMetrics.heightPixels;
                                          // 4 bytes per pixel
                                          final int screenBytes = screenWidth * screenHeight * 4;

                                          return screenBytes * 3;
                                          }





                                          share|improve this answer















                                          I had similar issue and this worked for me
                                          You can call this method to set size for image cache



                                          private int getCacheSize(Context context) {

                                          final DisplayMetrics displayMetrics = context.getResources().
                                          getDisplayMetrics();
                                          final int screenWidth = displayMetrics.widthPixels;
                                          final int screenHeight = displayMetrics.heightPixels;
                                          // 4 bytes per pixel
                                          final int screenBytes = screenWidth * screenHeight * 4;

                                          return screenBytes * 3;
                                          }






                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Aug 13 '15 at 10:30









                                          ketan

                                          15k123463




                                          15k123463










                                          answered Aug 13 '15 at 10:25









                                          developer_androiddeveloper_android

                                          11




                                          11























                                              0














                                              for my application, I had some data changing but I didn't want the entire view to blink.



                                              I solved it by only fading the oldview down 0.5 alpha and starting the newview alpha at 0.5. This created a softer fading transition without making the view disappear completely.



                                              Unfortunately because of private implementations, I couldn't subclass the DefaultItemAnimator in order to make this change so I had to clone the code and make the following changes



                                              in animateChange:



                                              ViewCompat.setAlpha(newHolder.itemView, 0);  //change 0 to 0.5f


                                              in animateChangeImpl:



                                              oldViewAnim.alpha(0).setListener(new VpaListenerAdapter() { //change 0 to 0.5f





                                              share|improve this answer






























                                                0














                                                for my application, I had some data changing but I didn't want the entire view to blink.



                                                I solved it by only fading the oldview down 0.5 alpha and starting the newview alpha at 0.5. This created a softer fading transition without making the view disappear completely.



                                                Unfortunately because of private implementations, I couldn't subclass the DefaultItemAnimator in order to make this change so I had to clone the code and make the following changes



                                                in animateChange:



                                                ViewCompat.setAlpha(newHolder.itemView, 0);  //change 0 to 0.5f


                                                in animateChangeImpl:



                                                oldViewAnim.alpha(0).setListener(new VpaListenerAdapter() { //change 0 to 0.5f





                                                share|improve this answer




























                                                  0












                                                  0








                                                  0







                                                  for my application, I had some data changing but I didn't want the entire view to blink.



                                                  I solved it by only fading the oldview down 0.5 alpha and starting the newview alpha at 0.5. This created a softer fading transition without making the view disappear completely.



                                                  Unfortunately because of private implementations, I couldn't subclass the DefaultItemAnimator in order to make this change so I had to clone the code and make the following changes



                                                  in animateChange:



                                                  ViewCompat.setAlpha(newHolder.itemView, 0);  //change 0 to 0.5f


                                                  in animateChangeImpl:



                                                  oldViewAnim.alpha(0).setListener(new VpaListenerAdapter() { //change 0 to 0.5f





                                                  share|improve this answer















                                                  for my application, I had some data changing but I didn't want the entire view to blink.



                                                  I solved it by only fading the oldview down 0.5 alpha and starting the newview alpha at 0.5. This created a softer fading transition without making the view disappear completely.



                                                  Unfortunately because of private implementations, I couldn't subclass the DefaultItemAnimator in order to make this change so I had to clone the code and make the following changes



                                                  in animateChange:



                                                  ViewCompat.setAlpha(newHolder.itemView, 0);  //change 0 to 0.5f


                                                  in animateChangeImpl:



                                                  oldViewAnim.alpha(0).setListener(new VpaListenerAdapter() { //change 0 to 0.5f






                                                  share|improve this answer














                                                  share|improve this answer



                                                  share|improve this answer








                                                  edited Apr 25 '16 at 19:24









                                                  tinlyx

                                                  10.8k1956109




                                                  10.8k1956109










                                                  answered Apr 25 '16 at 19:06









                                                  DeeferDeefer

                                                  314




                                                  314























                                                      0














                                                      for me recyclerView.setHasFixedSize(true); worked






                                                      share|improve this answer




























                                                        0














                                                        for me recyclerView.setHasFixedSize(true); worked






                                                        share|improve this answer


























                                                          0












                                                          0








                                                          0







                                                          for me recyclerView.setHasFixedSize(true); worked






                                                          share|improve this answer













                                                          for me recyclerView.setHasFixedSize(true); worked







                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered Jun 22 '16 at 13:59









                                                          PramodPramod

                                                          86321128




                                                          86321128























                                                              0














                                                              Using appropriate recyclerview methods to update views will solve this issue



                                                              First, make changes in the list



                                                              mList.add(item);
                                                              or mList.addAll(itemList);
                                                              or mList.remove(index);


                                                              Then notify using



                                                              notifyItemInserted(addedItemIndex);
                                                              or
                                                              notifyItemRemoved(removedItemIndex);
                                                              or
                                                              notifyItemRangeChanged(fromIndex, newUpdatedItemCount);


                                                              Hope this will help!!






                                                              share|improve this answer


























                                                              • Absolutely not. If you are making several updates by seconds (BLE scanning in my case) it doesn't work at all. I spent one day to update to this shit RecyclerAdapter... Better to keep ArrayAdapter. It's a shame that's not using MVC pattern, but at least it's almost usable.

                                                                – Gojir4
                                                                Jun 4 '18 at 15:01
















                                                              0














                                                              Using appropriate recyclerview methods to update views will solve this issue



                                                              First, make changes in the list



                                                              mList.add(item);
                                                              or mList.addAll(itemList);
                                                              or mList.remove(index);


                                                              Then notify using



                                                              notifyItemInserted(addedItemIndex);
                                                              or
                                                              notifyItemRemoved(removedItemIndex);
                                                              or
                                                              notifyItemRangeChanged(fromIndex, newUpdatedItemCount);


                                                              Hope this will help!!






                                                              share|improve this answer


























                                                              • Absolutely not. If you are making several updates by seconds (BLE scanning in my case) it doesn't work at all. I spent one day to update to this shit RecyclerAdapter... Better to keep ArrayAdapter. It's a shame that's not using MVC pattern, but at least it's almost usable.

                                                                – Gojir4
                                                                Jun 4 '18 at 15:01














                                                              0












                                                              0








                                                              0







                                                              Using appropriate recyclerview methods to update views will solve this issue



                                                              First, make changes in the list



                                                              mList.add(item);
                                                              or mList.addAll(itemList);
                                                              or mList.remove(index);


                                                              Then notify using



                                                              notifyItemInserted(addedItemIndex);
                                                              or
                                                              notifyItemRemoved(removedItemIndex);
                                                              or
                                                              notifyItemRangeChanged(fromIndex, newUpdatedItemCount);


                                                              Hope this will help!!






                                                              share|improve this answer















                                                              Using appropriate recyclerview methods to update views will solve this issue



                                                              First, make changes in the list



                                                              mList.add(item);
                                                              or mList.addAll(itemList);
                                                              or mList.remove(index);


                                                              Then notify using



                                                              notifyItemInserted(addedItemIndex);
                                                              or
                                                              notifyItemRemoved(removedItemIndex);
                                                              or
                                                              notifyItemRangeChanged(fromIndex, newUpdatedItemCount);


                                                              Hope this will help!!







                                                              share|improve this answer














                                                              share|improve this answer



                                                              share|improve this answer








                                                              edited Apr 14 '17 at 11:47

























                                                              answered Aug 24 '16 at 9:16









                                                              Sreedhu MadhuSreedhu Madhu

                                                              1,40521432




                                                              1,40521432













                                                              • Absolutely not. If you are making several updates by seconds (BLE scanning in my case) it doesn't work at all. I spent one day to update to this shit RecyclerAdapter... Better to keep ArrayAdapter. It's a shame that's not using MVC pattern, but at least it's almost usable.

                                                                – Gojir4
                                                                Jun 4 '18 at 15:01



















                                                              • Absolutely not. If you are making several updates by seconds (BLE scanning in my case) it doesn't work at all. I spent one day to update to this shit RecyclerAdapter... Better to keep ArrayAdapter. It's a shame that's not using MVC pattern, but at least it's almost usable.

                                                                – Gojir4
                                                                Jun 4 '18 at 15:01

















                                                              Absolutely not. If you are making several updates by seconds (BLE scanning in my case) it doesn't work at all. I spent one day to update to this shit RecyclerAdapter... Better to keep ArrayAdapter. It's a shame that's not using MVC pattern, but at least it's almost usable.

                                                              – Gojir4
                                                              Jun 4 '18 at 15:01





                                                              Absolutely not. If you are making several updates by seconds (BLE scanning in my case) it doesn't work at all. I spent one day to update to this shit RecyclerAdapter... Better to keep ArrayAdapter. It's a shame that's not using MVC pattern, but at least it's almost usable.

                                                              – Gojir4
                                                              Jun 4 '18 at 15:01


















                                                              draft saved

                                                              draft discarded




















































                                                              Thanks for contributing an answer to Stack Overflow!


                                                              • Please be sure to answer the question. Provide details and share your research!

                                                              But avoid



                                                              • Asking for help, clarification, or responding to other answers.

                                                              • Making statements based on opinion; back them up with references or personal experience.


                                                              To learn more, see our tips on writing great answers.




                                                              draft saved


                                                              draft discarded














                                                              StackExchange.ready(
                                                              function () {
                                                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29331075%2frecyclerview-blinking-after-notifydatasetchanged%23new-answer', 'question_page');
                                                              }
                                                              );

                                                              Post as a guest















                                                              Required, but never shown





















































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown

































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown







                                                              Popular posts from this blog

                                                              404 Error Contact Form 7 ajax form submitting

                                                              How to know if a Active Directory user can login interactively

                                                              TypeError: fit_transform() missing 1 required positional argument: 'X'