本文整理匯總了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);
}