當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。