/** * Constructor that accepts interfaces for providing the dimensions of images to preload, the list * of models to preload for a given position, and the request to use to load images. * * @param preloadModelProvider Provides models to load and requests capable of loading them. * @param preloadDimensionProvider Provides the dimensions of images to load. * @param maxPreload Maximum number of items to preload. */ public RecyclerViewPreloader(RequestManager requestManager, PreloadModelProvider<T> preloadModelProvider, PreloadSizeProvider<T> preloadDimensionProvider, int maxPreload) { ListPreloader<T> listPreloader = new ListPreloader<>(requestManager, preloadModelProvider, preloadDimensionProvider, maxPreload); recyclerScrollListener = new RecyclerToListViewScrollListener(listPreloader); }
private void setupImagePreload() { mPreloadRequest = Glide.with(this) .fromMediaStore() .diskCacheStrategy(DiskCacheStrategy.NONE) .fitCenter(); final AsymmetricSizeProvider sizeProvider = new AsymmetricSizeProvider(getActivity(), mAdapter); final ListPreloader<FodexLayoutSpecItem> preloader = new ListPreloader<>(mAdapter, sizeProvider, PRELOAD_SIZE); mFloatingActionMenu.attachToListView(mGridView, null, preloader); }
/** * Constructor that accepts interfaces for providing the dimensions of images to preload, the list * of models to preload for a given position, and the request to use to load images. * * @param preloadModelProvider Provides models to load and requests capable of loading them. * @param preloadDimensionProvider Provides the dimensions of images to load. * @param maxPreload Maximum number of items to preload. */ public RecyclerViewPreloader(PreloadModelProvider<T> preloadModelProvider, PreloadSizeProvider<T> preloadDimensionProvider, int maxPreload) { ListPreloader<T> listPreloader = new ListPreloader<>(preloadModelProvider, preloadDimensionProvider, maxPreload); recyclerScrollListener = new RecyclerToListViewScrollListener(listPreloader); }
/** * Constructor that accepts interfaces for providing the dimensions of images to preload, the list * of models to preload for a given position, and the request to use to load images. * * @param preloadModelProvider Provides models to load and requests capable of loading them. * @param preloadDimensionProvider Provides the dimensions of images to load. * @param maxPreload Maximum number of items to preload. */ public RecyclerViewPreloader(RequestManager requestManager, PreloadModelProvider<T> preloadModelProvider, PreloadSizeProvider<T> preloadDimensionProvider, int maxPreload) { ListPreloader<T> listPreloader = new ListPreloader<>(preloadModelProvider, preloadDimensionProvider, maxPreload); recyclerScrollListener = new RecyclerToListViewScrollListener(listPreloader); }
/** * Constructor that accepts interfaces for providing the dimensions of images to preload, the * list * of models to preload for a given position, and the request to use to load images. * * @param preloadModelProvider Provides models to load and requests capable of loading them. * @param preloadDimensionProvider Provides the dimensions of images to load. * @param maxPreload Maximum number of items to preload. */ public RecyclerViewPreloader(RequestManager requestManager, PreloadModelProvider<T> preloadModelProvider, PreloadSizeProvider<T> preloadDimensionProvider, int maxPreload) { ListPreloader listPreloader = new ListPreloader<>(preloadModelProvider, preloadDimensionProvider, maxPreload); recyclerScrollListener = new RecyclerToListViewScrollListener(listPreloader); }