├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── dictionaries │ └── lifan.xml ├── modules.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── styles.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── strings.xml │ │ │ ├── menu │ │ │ │ └── menu_main.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── ns │ │ │ └── mutiphotochoser │ │ │ └── sample │ │ │ ├── ImageGridAdapter.java │ │ │ └── MainActivity.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── ns │ │ └── mutiphotochoser │ │ └── sample │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── app.iml ├── library ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── image_check_on.png │ │ │ │ ├── default_photo.9.png │ │ │ │ ├── image_check_off.png │ │ │ │ ├── image_done_active.png │ │ │ │ └── image_done_normal.png │ │ │ ├── drawable │ │ │ │ ├── empty_icon.xml │ │ │ │ ├── number_bg.xml │ │ │ │ ├── drawable_done.xml │ │ │ │ └── image_chose_selector.xml │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ └── colors.xml │ │ │ └── layout │ │ │ │ ├── fragment_image_grid_layout.xml │ │ │ │ ├── image_grid_item.xml │ │ │ │ └── activity_pick_images.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── ns │ │ │ └── mutiphotochoser │ │ │ ├── constant │ │ │ ├── CacheConstant.java │ │ │ └── Constant.java │ │ │ ├── utils │ │ │ ├── ChoseImageListener.java │ │ │ └── DisplayUtils.java │ │ │ ├── model │ │ │ └── ImageBean.java │ │ │ ├── content │ │ │ └── ImagesLoader.java │ │ │ ├── fragment │ │ │ ├── ImageGridFragment.java │ │ │ └── ImagePagerFragment.java │ │ │ ├── adapter │ │ │ └── ImageGridAdapter.java │ │ │ ├── GalleryActivity.java │ │ │ └── widget │ │ │ └── HeaderGridView.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── ns │ │ └── mutiphotochoser │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── library.iml ├── settings.gradle ├── ScreenShot └── 2015-06-24_172813.jpg ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── MutiPhotoChoser.iml ├── README.md ├── gradlew.bat ├── gradlew └── LICENSE /.idea/.name: -------------------------------------------------------------------------------- 1 | MutiPhotoChoser -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':library' 2 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /ScreenShot/2015-06-24_172813.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/ScreenShot/2015-06-24_172813.jpg -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/image_check_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/library/src/main/res/drawable-xxhdpi/image_check_on.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/default_photo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/library/src/main/res/drawable-xxhdpi/default_photo.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/image_check_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/library/src/main/res/drawable-xxhdpi/image_check_off.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/image_done_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/library/src/main/res/drawable-xxhdpi/image_done_active.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/image_done_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laomengzhu/MutiPhotoChoser/HEAD/library/src/main/res/drawable-xxhdpi/image_done_normal.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/dictionaries/lifan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | mutiphotochoser 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/empty_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MutiPhotoChoser 3 | 4 | Hello world! 5 | Settings 6 | Add Photo 7 | 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /library/src/main/java/com/ns/mutiphotochoser/constant/CacheConstant.java: -------------------------------------------------------------------------------- 1 | package com.ns.mutiphotochoser.constant; 2 | 3 | /** 4 | * Created by xiaolifan on 15-4-15. 5 | */ 6 | public abstract class CacheConstant { 7 | 8 | public static final String IMAGE_CACHE_DIRECTORY = "images"; 9 | } 10 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/number_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Library 3 | 已选择 4 | 5 | 选择图片 6 | 已达到最大选择数 7 | 8 | -------------------------------------------------------------------------------- /library/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #ffffff 5 | #ff0000 6 | #dddddd 7 | #7f000000 8 | #00000000 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/java/com/ns/mutiphotochoser/utils/ChoseImageListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.ns.mutiphotochoser.utils; 5 | 6 | 7 | import com.ns.mutiphotochoser.model.ImageBean; 8 | 9 | /** 10 | * @author xiaolf1 11 | */ 12 | public interface ChoseImageListener { 13 | 14 | public boolean onSelected(ImageBean image); 15 | 16 | public boolean onCancelSelect(ImageBean image); 17 | } 18 | -------------------------------------------------------------------------------- /library/src/androidTest/java/com/ns/mutiphotochoser/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.ns.mutiphotochoser; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/com/ns/mutiphotochoser/sample/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.ns.mutiphotochoser.sample; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /library/src/main/res/drawable/drawable_done.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /library/src/main/java/com/ns/mutiphotochoser/constant/Constant.java: -------------------------------------------------------------------------------- 1 | package com.ns.mutiphotochoser.constant; 2 | 3 | /** 4 | * Created by lifan on 2015/6/24. 5 | */ 6 | public abstract class Constant { 7 | 8 | /** 9 | * 要选择的图片数量key 10 | */ 11 | public static final String EXTRA_PHOTO_LIMIT = "com.ns.mutiphotochoser.extra.PHOTO_LIMIT"; 12 | 13 | /** 14 | * 选择返回结果保存key 15 | */ 16 | public static final String EXTRA_PHOTO_PATHS = "com.ns.mutiphotochoser.extra.PHOTO_PATHS"; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /library/src/main/java/com/ns/mutiphotochoser/utils/DisplayUtils.java: -------------------------------------------------------------------------------- 1 | package com.ns.mutiphotochoser.utils; 2 | 3 | import android.content.Context; 4 | 5 | public class DisplayUtils { 6 | 7 | public static int px2dip(float pxValue, Context context) { 8 | return (int) (pxValue 9 | / context.getResources().getDisplayMetrics().density + 0.5f); 10 | } 11 | 12 | public static int dip2px(float dipValue, Context context) { 13 | return (int) (dipValue 14 | * context.getResources().getDisplayMetrics().density + 0.5f); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 22 5 | buildToolsVersion "22.0.1" 6 | 7 | defaultConfig { 8 | minSdkVersion 8 9 | targetSdkVersion 22 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(dir: 'libs', include: ['*.jar']) 23 | compile 'com.android.support:appcompat-v7:22.1.1' 24 | compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3' 25 | } 26 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/image_chose_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 22 5 | buildToolsVersion "22.0.1" 6 | 7 | defaultConfig { 8 | applicationId "com.ns.mutiphotochoser.sample" 9 | minSdkVersion 8 10 | targetSdkVersion 22 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | compile 'com.android.support:appcompat-v7:22.1.1' 25 | compile 'com.jakewharton:butterknife:6.1.0' 26 | compile project(':library') 27 | } 28 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /MutiPhotoChoser.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 18 | 19 |