本文整理汇总了Java中com.nostra13.universalimageloader.core.process.BitmapProcessor类的典型用法代码示例。如果您正苦于以下问题:Java BitmapProcessor类的具体用法?Java BitmapProcessor怎么用?Java BitmapProcessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BitmapProcessor类属于com.nostra13.universalimageloader.core.process包,在下文中一共展示了BitmapProcessor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillUI
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
private void fillUI() {
mTvTitle.setText(mSoftware.getTitle());
mTvLicense.setText(mSoftware.getLicense());
mTvLanguage.setText(mSoftware.getLanguage());
mTvOs.setText(mSoftware.getOs());
mTvRecordTime.setText(mSoftware.getRecordtime());
DisplayImageOptions options = new DisplayImageOptions.Builder()
.cacheInMemory(true).cacheOnDisk(true)
.postProcessor(new BitmapProcessor() {
@Override
public Bitmap process(Bitmap arg0) {
return arg0;
}
}).build();
ImageLoader.getInstance().displayImage(mSoftware.getLogo(), mIvLogo,
options);
notifyFavorite(mSoftware.getFavorite() == 1);
}
示例2: getStandardOptions
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
private static ImageLoaderConfiguration getStandardOptions(final Context context,
final BitmapProcessor processor) {
final ImageLoaderConfiguration.Builder config =
new ImageLoaderConfiguration.Builder(context);
config.defaultDisplayImageOptions(getProcessorDisplayImageOptions(processor));
config.memoryCache(new WeakMemoryCache());
config.taskExecutor(Executors.newCachedThreadPool());
config.threadPriority(Thread.MIN_PRIORITY);
config.imageDownloader(new OkHttpDownloader(context));
config.writeDebugLogs();
return config.build();
}
示例3: run
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
@Override
public void run() {
L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);
BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
Bitmap processedBitmap = processor.process(bitmap);
DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
LoadedFrom.MEMORY_CACHE);
LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
示例4: diskCacheExtraOptions
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
public Builder diskCacheExtraOptions(int maxImageWidthForDiskCache, int
maxImageHeightForDiskCache, BitmapProcessor processorForDiskCache) {
this.maxImageWidthForDiskCache = maxImageWidthForDiskCache;
this.maxImageHeightForDiskCache = maxImageHeightForDiskCache;
this.processorForDiskCache = processorForDiskCache;
return this;
}
示例5: getView
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
public View getView(final int position, View convertView, ViewGroup parent){
Holder holder = new Holder();
LayoutInflater li = LayoutInflater.from(context);
PlaylistItem current = playlistItems.get(position);
View itemView = li.inflate(R.layout.listitem_screeninvader, parent, false);
holder.title = (TextView) itemView.findViewById(R.id.view_title);
holder.timestamp = (TextView) itemView.findViewById(R.id.view_timestamp);
holder.thumbnail = (ImageView) itemView.findViewById(R.id.view_thumbnail);
holder.title.setText(current.title);
if(current.category == "youtube") {holder.timestamp.setText(getDuration(current.source_url));}
current.id = current.url.substring(current.url.length() - 11);
String thumbnailUrl = String.format(YOUTUBE_THUMBNAIL_LINK, current.id);
DisplayImageOptions options = new DisplayImageOptions.Builder()
.showImageForEmptyUri(R.drawable.ic_issues)
.postProcessor(new BitmapProcessor() {
@Override
public Bitmap process(Bitmap bmp) {
return Bitmap.createScaledBitmap(bmp, dpToPx(71), dpToPx(40), false);
}
})
.build();
imageLoader.displayImage(thumbnailUrl, holder.thumbnail, options);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SIAPI.sendSICommand("/playlist/index", Integer.toString(position));
}
});
return itemView;
}
示例6: run
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
@Override
public void run() {
L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);
BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
Bitmap processedBitmap = processor.process(bitmap);
com.nostra13.universalimageloader.core.DisplayBitmapTask displayBitmapTask = new com.nostra13.universalimageloader.core.DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
LoadedFrom.MEMORY_CACHE);
com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
示例7: diskCacheExtraOptions
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
public Builder diskCacheExtraOptions(int i1, int j1, BitmapProcessor bitmapprocessor)
{
h = i1;
i = j1;
j = bitmapprocessor;
return this;
}
示例8: diskCacheExtraOptions
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
public w diskCacheExtraOptions(int i1, int j1, BitmapProcessor bitmapprocessor)
{
h = i1;
i = j1;
j = bitmapprocessor;
return this;
}
示例9: run
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
@Override
public void run() {
L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);
//获取图片处理器 然后取得加载的图片
BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
Bitmap processedBitmap = processor.process(bitmap);
//封装图片显示任务 其中图片来源设置成-来自内存缓存
DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
LoadedFrom.MEMORY_CACHE);
//执行任务
LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
开发者ID:jiangqqlmj,项目名称:Android-Universal-Image-Loader-Modify,代码行数:13,代码来源:ProcessAndDisplayImageTask.java
示例10: UserCenterAdapter
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
public UserCenterAdapter(DislayModeChangeListener lis) {
mStates.put(DisplayMode.ACTIVE, STATE_LESS_ONE_PAGE);
mStates.put(DisplayMode.BLOG, STATE_LESS_ONE_PAGE);
mStates.put(DisplayMode.INFOMATION, STATE_LESS_ONE_PAGE);
mListener = lis;
options = new DisplayImageOptions.Builder().cacheInMemory(true)
.cacheOnDisk(true).postProcessor(new BitmapProcessor() {
@Override
public Bitmap process(Bitmap arg0) {
return arg0;
}
}).build();
}
示例11: onCreate
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
options = new DisplayImageOptions.Builder().cacheOnDisk(true)
.cacheInMemory(true).postProcessor(new BitmapProcessor() {
@Override
public Bitmap process(Bitmap arg0) {
return arg0;
}
}).build();
}
示例12: SamplePagerAdapter
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
SamplePagerAdapter(String[] images, OnPagerClickListener lis) {
mListener = lis;
this.images = images;
options = new DisplayImageOptions.Builder().cacheInMemory(true)
.postProcessor(new BitmapProcessor() {
@Override
public Bitmap process(Bitmap arg0) {
return arg0;
}
}).cacheOnDisk(true).build();
}
示例13: getWeiboImageDisplayImageOptions
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
public static DisplayImageOptions getWeiboImageDisplayImageOptions(
BitmapProcessor postProcessor) {
return new DisplayImageOptions.Builder()
.showImageOnFail(R.drawable.weibo_image_holder)
.showImageOnLoading(R.drawable.weibo_image_holder)
.cacheOnDisk(true).postProcessor(postProcessor).build();
}
示例14: run
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
@Override
public void run() {
if (engine.configuration.writeLogs) L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);
BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
final Bitmap processedBitmap = processor.process(bitmap);
DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine, LoadedFrom.MEMORY_CACHE);
displayBitmapTask.setLoggingEnabled(engine.configuration.writeLogs);
if (imageLoadingInfo.options.isSyncLoading()) {
displayBitmapTask.run();
} else {
handler.post(displayBitmapTask);
}
}
示例15: downloadImage
import com.nostra13.universalimageloader.core.process.BitmapProcessor; //导入依赖的package包/类
public static void downloadImage(String url, int maxHeight, SimpleImageLoadingListener listener, Context context)
{
AppDeck appDeck = AppDeck.getInstance();
final int height = maxHeight;
DisplayImageOptions options = appDeck.getDisplayImageOptionsBuilder()
.preProcessor(new BitmapProcessor() {
@Override
public Bitmap process(Bitmap in) {
// TODO Auto-generated method stub
int width = in.getWidth() * height / in.getHeight();
if (width > 0 && height > 0)
return Bitmap.createScaledBitmap(in, width, height, true);
return in;
}
})
.build();
// Load image, decode it to Bitmap and return Bitmap to callback
//appDeck.imageLoader.loadImage(url, options, listener);
ImageSize targetSize = new ImageSize(0, 0);
ImageView fakeImage = new ImageView(context);
fakeImage.setLayoutParams(new LayoutParams(targetSize.getWidth(), targetSize.getHeight()));
fakeImage.setScaleType(ScaleType.CENTER_CROP);
appDeck.imageLoader.displayImage(url, fakeImage, options, new Utils.FakeImageSimpleImageLoadingListener(fakeImage, listener) {});
}