├── 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 │ │ │ │ ├── dimens.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── menu │ │ │ │ └── menu_main.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── values-zh │ │ │ │ └── strings.xml │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── me │ │ │ └── nereo │ │ │ └── multiimageselector │ │ │ └── MainActivity.java │ └── androidTest │ │ └── java │ │ └── me │ │ └── nereo │ │ └── multiimageselector │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── multi-image-selector ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── public.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── strings.xml │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── mis_asv.png │ │ │ │ ├── mis_asy.png │ │ │ │ ├── mis_btn_selected.png │ │ │ │ ├── mis_default_check.png │ │ │ │ ├── mis_default_error.png │ │ │ │ ├── mis_btn_unselected.png │ │ │ │ └── mis_text_indicator.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── mis_btn_back.png │ │ │ │ ├── mis_ic_menu_back.png │ │ │ │ ├── mis_default_check_s.png │ │ │ │ └── mis_selector_indicator.png │ │ │ ├── xml │ │ │ │ └── mis_file_paths.xml │ │ │ ├── values-sw360dp │ │ │ │ └── dimens.xml │ │ │ ├── values-sw480dp │ │ │ │ └── dimens.xml │ │ │ ├── values-sw720dp │ │ │ │ └── dimens.xml │ │ │ ├── color │ │ │ │ ├── mis_default_text_color.xml │ │ │ │ └── mis_folder_text_color.xml │ │ │ ├── layout │ │ │ │ ├── mis_list_item_camera.xml │ │ │ │ ├── mis_list_item_image.xml │ │ │ │ ├── mis_activity_default.xml │ │ │ │ ├── mis_cmp_customer_actionbar.xml │ │ │ │ ├── mis_fragment_multi_image.xml │ │ │ │ └── mis_list_item_folder.xml │ │ │ ├── values-zh │ │ │ │ └── strings.xml │ │ │ ├── drawable │ │ │ │ └── mis_action_btn.xml │ │ │ └── layout-v14 │ │ │ │ └── mis_fragment_multi_image.xml │ │ ├── java │ │ │ └── me │ │ │ │ └── nereo │ │ │ │ └── multi_image_selector │ │ │ │ ├── utils │ │ │ │ ├── MISFileProvider.java │ │ │ │ ├── ScreenUtils.java │ │ │ │ ├── TimeUtils.java │ │ │ │ └── FileUtils.java │ │ │ │ ├── bean │ │ │ │ ├── Folder.java │ │ │ │ └── Image.java │ │ │ │ ├── view │ │ │ │ ├── SquaredImageView.java │ │ │ │ └── SquareFrameLayout.java │ │ │ │ ├── MultiImageSelector.java │ │ │ │ ├── adapter │ │ │ │ ├── FolderAdapter.java │ │ │ │ └── ImageGridAdapter.java │ │ │ │ ├── MultiImageSelectorActivity.java │ │ │ │ └── MultiImageSelectorFragment.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── me │ │ └── nereo │ │ └── multi_image_selector │ │ └── ApplicationTest.java ├── project.properties ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── art ├── select_1.png ├── select_2.png ├── select_3.png └── example_1.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── LICENSE ├── bintray-release.gradle ├── gradlew.bat ├── gradlew ├── README_zh.md └── README.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | *.iml 3 | -------------------------------------------------------------------------------- /multi-image-selector/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | *.iml 3 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':multi-image-selector' 2 | -------------------------------------------------------------------------------- /art/select_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/art/select_1.png -------------------------------------------------------------------------------- /art/select_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/art/select_2.png -------------------------------------------------------------------------------- /art/select_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/art/select_3.png -------------------------------------------------------------------------------- /art/example_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/art/example_1.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/values/public.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #21282C 4 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xxhdpi/mis_asv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xxhdpi/mis_asv.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xxhdpi/mis_asy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xxhdpi/mis_asy.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xhdpi/mis_btn_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xhdpi/mis_btn_back.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xhdpi/mis_ic_menu_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xhdpi/mis_ic_menu_back.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xxhdpi/mis_btn_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xxhdpi/mis_btn_selected.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xxhdpi/mis_default_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xxhdpi/mis_default_check.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xxhdpi/mis_default_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xxhdpi/mis_default_error.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xhdpi/mis_default_check_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xhdpi/mis_default_check_s.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xxhdpi/mis_btn_unselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xxhdpi/mis_btn_unselected.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xxhdpi/mis_text_indicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xxhdpi/mis_text_indicator.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable-xhdpi/mis_selector_indicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq549631030/MultiImageSelector/HEAD/multi-image-selector/src/main/res/drawable-xhdpi/mis_selector_indicator.png -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/xml/mis_file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 120dp 4 | 2dp 5 | 72dp 6 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/values-sw360dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 96dp 4 | 2dp 5 | 72dp 6 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/values-sw480dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 100dp 4 | 2dp 5 | 72dp 6 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/values-sw720dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 120dp 4 | 3dp 5 | 82dp 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jan 20 11:08:16 CST 2017 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.14.1-all.zip 7 | -------------------------------------------------------------------------------- /multi-image-selector/project.properties: -------------------------------------------------------------------------------- 1 | #project 2 | project.name=Multi-Image-Selector 3 | project.groupId=com.hx.multi-image-selector 4 | project.artifactId=multi-image-selector 5 | project.siteUrl=https://github.com/qq549631030/MultiImageSelector 6 | project.gitUrl=https://github.com/qq549631030/MultiImageSelector.git -------------------------------------------------------------------------------- /multi-image-selector/src/main/java/me/nereo/multi_image_selector/utils/MISFileProvider.java: -------------------------------------------------------------------------------- 1 | package me.nereo.multi_image_selector.utils; 2 | 3 | import android.support.v4.content.FileProvider; 4 | 5 | /** 6 | * @author huangx 7 | * @date 2017/12/15 8 | */ 9 | 10 | public class MISFileProvider extends FileProvider { 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/src/androidTest/java/me/nereo/multiimageselector/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package me.nereo.multiimageselector; 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 | } -------------------------------------------------------------------------------- /multi-image-selector/src/androidTest/java/me/nereo/multi_image_selector/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package me.nereo.multi_image_selector; 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 | } -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/color/mis_default_text_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/color/mis_folder_text_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | *.iml 17 | .idea/ 18 | .gradle/ 19 | build/ 20 | /*/build/ 21 | /local.properties 22 | /.idea/workspace.xml 23 | /.idea/libraries 24 | .DS_Store 25 | 26 | # Local configuration file (sdk path, etc) 27 | local.properties 28 | 29 | # Proguard folder generated by Eclipse 30 | proguard/ 31 | 32 | # Log Files 33 | *.log 34 | -------------------------------------------------------------------------------- /app/src/main/res/values-zh/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 多图选择 3 | 4 | 设置 5 | 6 | 选择模式 7 | 单选 8 | 多选 9 | 最大选择数量 10 | 默认数量为9 11 | 是否启用照相机 12 | 13 | 14 | 图片选择 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MultiImageSelector 3 | 4 | Settings 5 | Select Mode 6 | Single-Choice 7 | Multi-Choice 8 | Max Selected Amount 9 | default amount is 9 10 | Enable Camera 11 | Enable 12 | Disable 13 | Select 14 | 15 | 16 | -------------------------------------------------------------------------------- /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 F:\Nereo\Program\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 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/java/me/nereo/multi_image_selector/bean/Folder.java: -------------------------------------------------------------------------------- 1 | package me.nereo.multi_image_selector.bean; 2 | 3 | import android.text.TextUtils; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 文件夹 9 | * Created by Nereo on 2015/4/7. 10 | */ 11 | public class Folder { 12 | public String name; 13 | public String path; 14 | public Image cover; 15 | public List images; 16 | 17 | @Override 18 | public boolean equals(Object o) { 19 | try { 20 | Folder other = (Folder) o; 21 | return TextUtils.equals(other.path, path); 22 | }catch (ClassCastException e){ 23 | e.printStackTrace(); 24 | } 25 | return super.equals(o); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion '25.0.1' 6 | 7 | defaultConfig { 8 | applicationId "me.nereo.multiimageselector" 9 | minSdkVersion 12 10 | targetSdkVersion 25 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 project(':multi-image-selector') 25 | compile 'com.android.support:appcompat-v7:25.1.0' 26 | } 27 | -------------------------------------------------------------------------------- /multi-image-selector/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 F:/Nereo/Program/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 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/java/me/nereo/multi_image_selector/view/SquaredImageView.java: -------------------------------------------------------------------------------- 1 | package me.nereo.multi_image_selector.view; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.ImageView; 6 | 7 | /** An image view which always remains square with respect to its width. */ 8 | class SquaredImageView extends ImageView { 9 | public SquaredImageView(Context context) { 10 | super(context); 11 | } 12 | 13 | public SquaredImageView(Context context, AttributeSet attrs) { 14 | super(context, attrs); 15 | } 16 | 17 | @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 18 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 19 | setMeasuredDimension(getMeasuredWidth(), getMeasuredWidth()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/layout/mis_list_item_camera.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 16 | 17 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/java/me/nereo/multi_image_selector/view/SquareFrameLayout.java: -------------------------------------------------------------------------------- 1 | package me.nereo.multi_image_selector.view; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.FrameLayout; 6 | 7 | /** 8 | * Created by nereo on 15/11/10. 9 | */ 10 | public class SquareFrameLayout extends FrameLayout{ 11 | public SquareFrameLayout(Context context) { 12 | super(context); 13 | } 14 | 15 | public SquareFrameLayout(Context context, AttributeSet attrs) { 16 | super(context, attrs); 17 | } 18 | 19 | @Override 20 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 21 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 22 | setMeasuredDimension(getMeasuredWidth(), getMeasuredWidth()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/java/me/nereo/multi_image_selector/bean/Image.java: -------------------------------------------------------------------------------- 1 | package me.nereo.multi_image_selector.bean; 2 | 3 | import android.text.TextUtils; 4 | 5 | /** 6 | * 图片实体 7 | * Created by Nereo on 2015/4/7. 8 | */ 9 | public class Image { 10 | public String path; 11 | public String name; 12 | public long time; 13 | 14 | public Image(String path, String name, long time){ 15 | this.path = path; 16 | this.name = name; 17 | this.time = time; 18 | } 19 | 20 | @Override 21 | public boolean equals(Object o) { 22 | try { 23 | Image other = (Image) o; 24 | return TextUtils.equals(this.path, other.path); 25 | }catch (ClassCastException e){ 26 | e.printStackTrace(); 27 | } 28 | return super.equals(o); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/values-zh/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 所有照片 3 | 预览 4 | 没有系统相机 5 | 已经达到最高选择数量 6 | 完成 7 | 8 | 拍摄照片 9 | 图片错误 10 | 无权限 11 | 权限拒绝 12 | 13 | 拒绝 14 | 浏览图片需要您提供浏览存储的权限 15 | 拍摄照片需要您提交摄像头权限 16 | 保存拍照图片需要您提供写存储权限 17 | 18 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/java/me/nereo/multi_image_selector/utils/ScreenUtils.java: -------------------------------------------------------------------------------- 1 | package me.nereo.multi_image_selector.utils; 2 | 3 | import android.content.Context; 4 | import android.graphics.Point; 5 | import android.os.Build; 6 | import android.view.Display; 7 | import android.view.WindowManager; 8 | 9 | /** 10 | * 屏幕工具 11 | * Created by nereo on 15/11/19. 12 | * Updated by nereo on 2016/1/19. 13 | */ 14 | public class ScreenUtils { 15 | 16 | public static Point getScreenSize(Context context){ 17 | WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); 18 | Display display = wm.getDefaultDisplay(); 19 | Point out = new Point(); 20 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { 21 | display.getSize(out); 22 | }else{ 23 | int width = display.getWidth(); 24 | int height = display.getHeight(); 25 | out.set(width, height); 26 | } 27 | return out; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 14 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/java/me/nereo/multi_image_selector/utils/TimeUtils.java: -------------------------------------------------------------------------------- 1 | package me.nereo.multi_image_selector.utils; 2 | 3 | import android.media.ExifInterface; 4 | 5 | import java.io.File; 6 | import java.io.IOException; 7 | import java.text.SimpleDateFormat; 8 | import java.util.Date; 9 | import java.util.Locale; 10 | 11 | /** 12 | * 时间处理工具 13 | * Created by Nereo on 2015/4/8. 14 | */ 15 | public class TimeUtils { 16 | 17 | public static String timeFormat(long timeMillis, String pattern){ 18 | SimpleDateFormat format = new SimpleDateFormat(pattern, Locale.CHINA); 19 | return format.format(new Date(timeMillis)); 20 | } 21 | 22 | public static String formatPhotoDate(long time){ 23 | return timeFormat(time, "yyyy-MM-dd"); 24 | } 25 | 26 | public static String formatPhotoDate(String path){ 27 | File file = new File(path); 28 | if(file.exists()){ 29 | long time = file.lastModified(); 30 | return formatPhotoDate(time); 31 | } 32 | return "1970-01-01"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/drawable/mis_action_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Nereo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /bintray-release.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.novoda.bintray-release' 2 | 3 | // This generates sources.jar 4 | task sourcesJar(type: Jar) { 5 | from android.sourceSets.main.java.srcDirs 6 | classifier = 'sources' 7 | } 8 | 9 | task javadoc(type: Javadoc) { 10 | source = android.sourceSets.main.java.srcDirs 11 | classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) 12 | failOnError false 13 | } 14 | 15 | // This generates javadoc.jar 16 | task javadocJar(type: Jar, dependsOn: javadoc) { 17 | classifier = 'javadoc' 18 | from javadoc.destinationDir 19 | } 20 | 21 | artifacts { 22 | archives javadocJar 23 | archives sourcesJar 24 | } 25 | 26 | // javadoc configuration 27 | javadoc { 28 | options { 29 | encoding "UTF-8" 30 | charSet 'UTF-8' 31 | author true 32 | } 33 | } 34 | 35 | afterEvaluate { 36 | Task bintrayUploadTask = tasks.findByName('bintrayUpload') 37 | Task uploadArchivesTask = tasks.findByName('uploadArchives') 38 | if (bintrayUploadTask != null && uploadArchivesTask != null) { 39 | bintrayUploadTask.dependsOn uploadArchivesTask 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/layout/mis_list_item_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 18 | 19 | 27 | 28 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | All Images 3 | Preview 4 | No system camera found 5 | Select images amount is limit 6 | Done 7 | %1$s(%2$d/%3$d) 8 | Shot 9 | Take photo 10 | Image error 11 | Has no permission 12 | Permission Deny 13 | OK 14 | CANCEL 15 | Storage read permission is needed to pick files. 16 | Camera permission is needed to take photo. 17 | Storage write permission is needed to save the image. 18 | 19 | -------------------------------------------------------------------------------- /multi-image-selector/src/main/res/layout/mis_activity_default.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 |