• 大小: 171KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-04
  • 语言: Java
  • 标签: Demo  

资源简介

Android仿微信图片选择器Demo/具备剪裁/自定义图片加载器等功能

资源截图

代码片段和文件信息

package com.lzy.imagepickerdemo;

import android.app.Application;
import android.widget.ImageView;

import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

import org.xutils.image.ImageOptions;
import org.xutils.x;

/**
 * ================================================
 * 作    者:jeasonlzy(廖子尧)
 * 版    本:1.0
 * 创建日期:2016/4/13
 * 描    述:我的Github地址  https://github.com/jeasonlzy0216
 * 修订历史:
 * ================================================
 */
public class GApp extends Application {

    public static DisplayImageOptions imageLoaderOptions = new DisplayImageOptions.Builder()//
            .showImageonloading(R.drawable.ic_default_image)         //设置图片在下载期间显示的图片
            .showImageForEmptyUri(R.drawable.ic_default_image)       //设置图片Uri为空或是错误的时候显示的图片
            .showImageOnFail(R.drawable.ic_default_image)            //设置图片加载/解码过程中错误时候显示的图片
            .cacheInMemory(true)                                //设置下载的图片是否缓存在内存中
            .cacheOnDisk(true)                                  //设置下载的图片是否缓存在SD卡中
            .build();                                           //构建完成

    public static ImageOptions xUtilsOptions = new ImageOptions.Builder()//
            .setIgnoreGif(false)                                //是否忽略GIF格式的图片
            .setImageScaleType(ImageView.ScaleType.FIT_CENTER)  //缩放模式
            .setLoadingDrawableId(R.drawable.ic_default_image)       //下载中显示的图片
            .setFailureDrawableId(R.drawable.ic_default_image)       //下载失败显示的图片
            .build();                                           //得到ImageOptions对象

    @Override
    public void onCreate() {
        super.onCreate();
        ImageLoaderConfiguration config = ImageLoaderConfiguration.createDefault(this);

        ImageLoader.getInstance().init(config);     //UniversalImageLoader初始化
        x.Ext.init(this);                           //xUtils3初始化
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-09-14 13:04  ImagePicker-master\
     文件          78  2017-09-14 13:04  ImagePicker-master\.gitignore
     文件       11351  2017-09-14 13:04  ImagePicker-master\LICENSE
     文件        8846  2017-09-14 13:04  ImagePicker-master\README.md
     目录           0  2017-09-14 13:04  ImagePicker-master\app\
     文件           7  2017-09-14 13:04  ImagePicker-master\app\.gitignore
     文件         996  2017-09-14 13:04  ImagePicker-master\app\build.gradle
     文件         645  2017-09-14 13:04  ImagePicker-master\app\proguard-rules.pro
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\main\
     文件         920  2017-09-14 13:04  ImagePicker-master\app\src\main\AndroidManifest.xml
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\main\java\
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\
     文件        2322  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\GApp.java
     文件       10641  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\ImagePickerActivity.java
     文件        8467  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\SelectDialog.java
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\imageloader\
     文件        1784  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\imageloader\GlideImageLoader.java
     文件        1648  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\imageloader\PicassoImageLoader.java
     文件        1333  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\imageloader\UILImageLoader.java
     文件        1814  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\imageloader\XUtils3ImageLoader.java
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\wxdemo\
     文件        3730  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\wxdemo\ImagePickerAdapter.java
     文件        7963  2017-09-14 13:04  ImagePicker-master\app\src\main\java\com\lzy\imagepickerdemo\wxdemo\WxDemoActivity.java
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\main\res\
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\main\res\anim\
     文件         285  2017-09-14 13:04  ImagePicker-master\app\src\main\res\anim\photo_dialog_in_anim.xml
     文件         285  2017-09-14 13:04  ImagePicker-master\app\src\main\res\anim\photo_dialog_out_anim.xml
     目录           0  2017-09-14 13:04  ImagePicker-master\app\src\main\res\drawable\
............此处省略123个文件信息

评论

共有 条评论