content: package com.bihe0832.android.lib.ui.recycleview.ext;
  
  import android.content.Context;
  import android.util.AttributeSet;
  
  import androidx.recyclerview.widget.GridLayoutManager;
  import androidx.recyclerview.widget.RecyclerView;
  
  /**
   * @author zixie code@bihe0832.com
   * Created on 2020/9/17.
   * Description: Description
   */
  public class SafeGridLayoutManager extends GridLayoutManager {
  
      public SafeGridLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
          super(context, attrs, defStyleAttr, defStyleRes);
      }
  
      public SafeGridLayoutManager(Context context, int spanCount) {
          super(context, spanCount);
      }
  
      public SafeGridLayoutManager(Context context, int spanCount, int orientation, boolean reverseLayout) {
          super(context, spanCount, orientation, reverseLayout);
  
      }
  
      @Override
      public boolean supportsPredictiveItemAnimations() {
          return false;
      }
  
      @Override
      public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
          //override this method and implement code as below
          try {
              super.onLayoutChildren(recycler, state);
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  
  }