本文整理汇总了Java中com.bumptech.glide.RequestManager.load方法的典型用法代码示例。如果您正苦于以下问题:Java RequestManager.load方法的具体用法?Java RequestManager.load怎么用?Java RequestManager.load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.bumptech.glide.RequestManager
的用法示例。
在下文中一共展示了RequestManager.load方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: instantiateItem
import com.bumptech.glide.RequestManager; //导入方法依赖的package包/类
@Override
public Object instantiateItem(final ViewGroup container, int position) {
final PhotoView view = new PhotoView(ImageBrowserActivity.this);
view.setScaleType(ImageView.ScaleType.FIT_CENTER);
ImageFile file = mList.get(position);
RequestManager requestManager = Glide.with(ImageBrowserActivity.this);
DrawableRequestBuilder requestBuilder;
if (file.getEditCount() > 0) {
requestBuilder = requestManager.load(file.getEditedPath())
.signature(new StringSignature(file.getEditCount() + ""));
} else {
requestBuilder = requestManager.load(file.getPath());
}
requestBuilder
.crossFade()
.placeholder(R.mipmap.ic_place_holder).into(view);
container.addView(view);
return view;
}
示例2: createBaseRequest
import com.bumptech.glide.RequestManager; //导入方法依赖的package包/类
public static DrawableTypeRequest createBaseRequest(RequestManager requestManager, Song song, boolean ignoreMediaStore) {
if (ignoreMediaStore) {
return requestManager.load(new AudioFileCover(song.data));
} else {
return requestManager.loadFromMediaStore(MusicUtil.getMediaStoreAlbumCoverUri(song.albumId));
}
}
示例3: onBindViewHolder
import com.bumptech.glide.RequestManager; //导入方法依赖的package包/类
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
ImageThumbnailHolder viewHolder = (ImageThumbnailHolder) holder;
ImageFile file = mSelectedThumbnailList.get(position);
RequestManager requestManager = Glide.with(ImageBrowserActivity.this);
DrawableRequestBuilder requestBuilder;
if (file.getEditCount() > 0) {
requestBuilder = requestManager.load(file.getEditedPath())
.signature(new StringSignature(file.getEditCount() + ""));
} else {
requestBuilder = requestManager.load(file.getPath());
}
requestBuilder.centerCrop()
.crossFade()
.placeholder(R.mipmap.ic_place_holder).into(viewHolder.imageView);
if (mList.get(mCurrentIndex).getId() == file.getId()) {
viewHolder.ivBlock.setVisibility(View.VISIBLE);
} else {
viewHolder.ivBlock.setVisibility(View.GONE);
}
if (mIsPreview) {
viewHolder.shadow.setVisibility(file.isSelected() ? View.GONE : View.VISIBLE);
}
viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mViewPager.setCurrentItem(Integer.valueOf(mSelectedPosition.get(position)), false);
mRecyclerView.scrollToPosition(position);
}
});
}
示例4: createBaseRequest
import com.bumptech.glide.RequestManager; //导入方法依赖的package包/类
static DrawableTypeRequest createBaseRequest(RequestManager requestManager, Song song, boolean ignoreMediaStore) {
if (ignoreMediaStore) {
return requestManager.load(new AudioFileCover(song.data));
} else {
return requestManager.loadFromMediaStore(MusicUtil.getMediaStoreAlbumCoverUri(song.albumId));
}
}
示例5: createBaseRequest
import com.bumptech.glide.RequestManager; //导入方法依赖的package包/类
static DrawableTypeRequest createBaseRequest(RequestManager requestManager, Artist artist, boolean noCustomImage, boolean forceDownload) {
boolean hasCustomImage = CustomArtistImageUtil.getInstance(RetroApplication.getInstance()).hasCustomArtistImage(artist);
if (noCustomImage || !hasCustomImage) {
return requestManager.load(new ArtistImage(artist.getName(), forceDownload));
} else {
return requestManager.load(CustomArtistImageUtil.getFile(artist));
}
}
示例6: createBaseRequest
import com.bumptech.glide.RequestManager; //导入方法依赖的package包/类
public static DrawableTypeRequest createBaseRequest(RequestManager requestManager, String wallpaper)
{
return requestManager.load(wallpaper);
}