public static <E> SimpleAdapter<E> makeItInfinite(final SimpleAdapter<E> srcAdapter) {
      if (srcAdapter.getSize() == Integer.MAX_VALUE) {
        return srcAdapter;
      }
      return new SimpleAdapter<E>() {
        @Override
        public int getSize() {
          return (srcAdapter.getSize() == 0) ? 0 : Integer.MAX_VALUE;
        }

        @Override
        public E get(int position) {
          return srcAdapter.get(position % srcAdapter.getSize());
        }

        @Override
        public boolean isLazy() {
          return srcAdapter.isLazy();
        }
      };
    }
This creates an infinite version of the given SimpleAdapter setting

@param srcAdapter The source SimpleAdapter
@param <E> The parameter type for this SimpleAdapter
@return The infinite version of this SimpleAdapter
samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/data/SimpleAdapter.java