当前位置: 首页>>代码示例>>Java>>正文


Java RequestManager.load方法代码示例

本文整理汇总了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;
}
 
开发者ID:liuke2016,项目名称:filepicker,代码行数:20,代码来源:ImageBrowserActivity.java

示例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));
    }
}
 
开发者ID:aliumujib,项目名称:Orin,代码行数:8,代码来源:SongGlideRequest.java

示例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);
        }
    });
}
 
开发者ID:liuke2016,项目名称:filepicker,代码行数:35,代码来源:ImageBrowserActivity.java

示例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));
    }
}
 
开发者ID:h4h13,项目名称:RetroMusicPlayer,代码行数:8,代码来源:SongGlideRequest.java

示例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));
    }
}
 
开发者ID:h4h13,项目名称:RetroMusicPlayer,代码行数:9,代码来源:ArtistGlideRequest.java

示例6: createBaseRequest

import com.bumptech.glide.RequestManager; //导入方法依赖的package包/类
public static DrawableTypeRequest createBaseRequest(RequestManager requestManager, String wallpaper)
{
       return requestManager.load(wallpaper);
   }
 
开发者ID:MSay2,项目名称:Mire,代码行数:5,代码来源:WallpaperGlideRequest.java


注:本文中的com.bumptech.glide.RequestManager.load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。