本文整理汇总了Java中com.bumptech.glide.ListPreloader类的典型用法代码示例。如果您正苦于以下问题:Java ListPreloader类的具体用法?Java ListPreloader怎么用?Java ListPreloader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ListPreloader类属于com.bumptech.glide包,在下文中一共展示了ListPreloader类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RecyclerViewPreloader
import com.bumptech.glide.ListPreloader; //导入依赖的package包/类
/**
* 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);
}
示例2: RecyclerViewPreloader
import com.bumptech.glide.ListPreloader; //导入依赖的package包/类
/**
* 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);
}
示例3: setupImagePreload
import com.bumptech.glide.ListPreloader; //导入依赖的package包/类
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);
}
示例4: RecyclerViewPreloader
import com.bumptech.glide.ListPreloader; //导入依赖的package包/类
/**
* 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);
}
示例5: RecyclerViewPreloader
import com.bumptech.glide.ListPreloader; //导入依赖的package包/类
/**
* 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);
}
示例6: RecyclerViewPreloader
import com.bumptech.glide.ListPreloader; //导入依赖的package包/类
/**
* 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);
}