imageloader

Universal-Image-Loader的使用

不羁岁月 提交于 2019-12-03 19:36:49
下载地址 https://github.com/nostra13/Android-Universal-Image-Loader Android 1.5 以上支持 每一个图片的加载和显示任务都运行在独立的线程中,除非这个图片缓存在内存中,这种情况下图片会立即显示。如果需要的图片缓存在本地,他们会开启一个独立的线程队列。如果在缓存中没有正确的图片,任务线程会从线程池中获取,因此,快速显示缓存图片时不会有明显的障碍。 需要的权限 < uses-permission android:name = "android.permission.INTERNET" /> < uses-permission android:name = "android.permission.WRITE_EXTERNAL_STORAGE" /> 获取缓存路径 File cacheDir = StorageUtils.getOwnCacheDirectory(getApplicationContext(), "imageloader/Cache" ); // 这个是你希望的缓存文件的目录: imageloader/Cache File cacheDir = StorageUtils.getCacheDirectory(context); ImageLoaderConfiguration 的配置 1. File

How to show images in list view that are stored in my SD Card particular location

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have created an app in which i had use SPenSDK to create image using canvasView. Once i create an images in the canvas view, i save the image in the SD Card "/mnt/sdcard/SmemoExample" location. Now I want to display all the images that are stores here "/mnt/sdcard/SmemoExample" in my ListView. But i am not able to find any solution for that. So please help to solve this out. If possible with an examples. List_view.xml file <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

weird ios libprotobuf.dylib cause crash

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i have my own protobuf compiled in the project (in the main target, not a lib), but I found a crash which is caused by protobuf code in libprotobuf.dylib ( which in my guess is a newly included lib in new version of device -- mine is ipad air). * thread #1: tid = 0x6598, 0x0027e96e TutorChat`void google::protobuf::internal::RepeatedPtrFieldBase::Destroy<google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler>(this=0x1567158c) + 66 at repeated_field.h:814, queue = 'com.apple.main-thread, stop reason = breakpoint

android using Renderscript for blur effect crashes causes A/libc: Fatal signal 7 (SIGBUS), code 2, fault addr 0x9e6fa000 in tid 482 (AsyncTask #1)

匿名 (未验证) 提交于 2019-12-03 00:46:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use blur effect,while applying to bitmap loaded from resources it works as expected,while using universal-imageloader to download image and applying to bitmap it causes A/libc: Fatal signal 7 (SIGBUS), code 2, fault addr 0x9d56e000 in tid 31955 (AsyncTask #1) public class MyActivity extends ActionBarActivity { private ImageView ivBackground; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my); ivBackground = (ImageView) findViewById(R.id.iv_background);

开源项目源码解析-Android Universal Image Loader 源码分析

隐身守侯 提交于 2019-12-03 00:38:12
Android Universal Image Loader 源码分析 本文为 Android 开源项目源码解析 中 Android Universal Image Loader 部分 项目地址: Android-Universal-Image-Loader ,分析的版本: eb794c3 ,Demo 地址: UIL Demo 分析者: huxian99 ,校对者: Grumoon 、 Trinea ,校对状态:完成 1. 功能介绍 1.1 Android Universal Image Loader Android Universal Image Loader 是一个强大的、可高度定制的图片缓存,本文简称为 UIL 。 简单的说 UIL 就做了一件事——获取图片并显示在相应的控件上。 1.2 基本使用 1.2.1 初始化 添加完依赖后在 Application 或 Activity 中初始化 ImageLoader ,如下: public class YourApplication extends Application { @Override public void onCreate() { super.onCreate(); ImageLoaderConfiguration configuration = new ImageLoaderConfiguration

ImageLoader

匿名 (未验证) 提交于 2019-12-03 00:26:01
package com.example.lianxi12; import android.app.Application; import android.content.Context; import android.graphics.Bitmap; import android.os.Handler; import com.nostra13.universalimageloader.cache.disc.naming.HashCodeFileNameGenerator; import com.nostra13.universalimageloader.cache.memory.impl.LruMemoryCache; import com.nostra13.universalimageloader.core.DisplayImageOptions; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; import com.nostra13.universalimageloader.core.assist.ImageScaleType; import com.nostra13

XRecycleView,多条目展示

亡梦爱人 提交于 2019-11-30 18:37:33
前一篇文章,我给大家简单的写了一下XRecycleView,但是,数据太少了,所以今天再给大家带来一篇完整的 先来看一下最终效果图吧,我是将多条目展示放在了一个Fragment中,但大体上不影响的。 接下来,就给大家具体的走一遍代码: 这个工程中,有XRecycleView、Banner轮播,OkHttp请求数据, 首先,还是敲代码前的准备工作,先导入依赖:(这离依赖有点多,所以我就部分了,全都粘来了,) compile 'com.android.support:appcompat-v7:25.3.1' testCompile 'junit:junit:4.12' compile 'com.android.support:mediarouter-v7:25.0.0' compile 'com.android.support:appcompat-v7:25.0.0' compile 'com.android.support:recyclerview-v7:25.0.0' compile 'com.squareup.okio:okio:1.5.0' compile 'com.squareup.okhttp3:okhttp:3.2.0' compile 'com.squareup.okhttp3:logging-interceptor:3.4.1' compile 'com.google