本文整理汇总了Java中com.veinhorn.scrollgalleryview.loader.MediaLoader类的典型用法代码示例。如果您正苦于以下问题:Java MediaLoader类的具体用法?Java MediaLoader怎么用?Java MediaLoader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MediaLoader类属于com.veinhorn.scrollgalleryview.loader包,在下文中一共展示了MediaLoader类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addMedia
import com.veinhorn.scrollgalleryview.loader.MediaLoader; //导入依赖的package包/类
public ScrollGalleryView addMedia(List<MediaInfo> infos) {
if (infos == null) {
throw new NullPointerException("Infos may not be null!");
}
for (MediaInfo info : infos) {
mListOfMedia.add(info);
final ImageView thumbnail = addThumbnail(getDefaultThumbnail());
info.getLoader().loadThumbnail(getContext(), thumbnail, new MediaLoader.SuccessCallback() {
@Override
public void onSuccess() {
thumbnail.setScaleType(ImageView.ScaleType.FIT_CENTER);
}
});
pagerAdapter.notifyDataSetChanged();
}
return this;
}
示例2: loadMedia
import com.veinhorn.scrollgalleryview.loader.MediaLoader; //导入依赖的package包/类
@Override
public void loadMedia(Context context, final ImageView imageView, final MediaLoader.SuccessCallback callback) {
Picasso.with(context)
.load(url)
.placeholder(R.drawable.placeholder_image)
.into(imageView, new ImageCallback(callback));
}
示例3: loadThumbnail
import com.veinhorn.scrollgalleryview.loader.MediaLoader; //导入依赖的package包/类
@Override
public void loadThumbnail(Context context, ImageView thumbnailView, MediaLoader.SuccessCallback callback) {
Picasso.with(context)
.load(url)
.resize(100, 100)
.placeholder(R.drawable.placeholder_image)
.centerInside()
.into(thumbnailView, new ImageCallback(callback));
}
示例4: loadImageToView
import com.veinhorn.scrollgalleryview.loader.MediaLoader; //导入依赖的package包/类
private void loadImageToView() {
if (mMediaInfo != null) {
mMediaInfo.getLoader().loadMedia(getActivity(), backgroundImage, new MediaLoader.SuccessCallback() {
@Override
public void onSuccess() {
createViewAttacher(getArguments());
}
});
}
}
示例5: loadImageToView
import com.veinhorn.scrollgalleryview.loader.MediaLoader; //导入依赖的package包/类
private void loadImageToView() {
if (mMediaInfo != null) {
mMediaInfo.getLoader().loadMedia(getActivity(), photoView, new MediaLoader.SuccessCallback() {
@Override
public void onSuccess() {}
});
}
}
示例6: getLoader
import com.veinhorn.scrollgalleryview.loader.MediaLoader; //导入依赖的package包/类
public MediaLoader getLoader() {
return mLoader;
}
示例7: setLoader
import com.veinhorn.scrollgalleryview.loader.MediaLoader; //导入依赖的package包/类
public MediaInfo setLoader(MediaLoader loader) {
mLoader = loader;
return this;
}