├── sample ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ └── styles.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── layout │ │ │ └── activity_main.xml │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ └── drawable │ │ │ └── ic_launcher_background.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── jay │ │ └── daguerre │ │ └── app │ │ └── MainActivity.java ├── proguard-rules.pro └── build.gradle ├── daguerre ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── xml │ │ │ └── daguerre_file_provider.xml │ │ ├── menu │ │ │ ├── daguerre_action_mode.xml │ │ │ ├── daguerre_action_camera.xml │ │ │ └── daguerre_action_video.xml │ │ ├── layout │ │ │ ├── daguerre_preview_resource_item.xml │ │ │ ├── daguerre_activity_preview_resource.xml │ │ │ ├── daguerre_activity.xml │ │ │ ├── daguerre_resource_item.xml │ │ │ └── daguerre_albums_item.xml │ │ ├── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── drawable │ │ │ ├── daguerre_ic_done.xml │ │ │ ├── daguerre_ic_badge_video.xml │ │ │ ├── daguerre_ic_video.xml │ │ │ ├── daguerre_btn_check_material.xml │ │ │ ├── daguerre_ic_camera.xml │ │ │ ├── daguerre_circle_checked.xml │ │ │ ├── daguerre_circle_unchecked.xml │ │ │ └── daguerre_ic_badge_gif.xml │ │ └── values-v19 │ │ │ └── styles.xml │ │ ├── java │ │ └── com │ │ │ └── jay │ │ │ └── daguerre │ │ │ ├── provider │ │ │ ├── DaguerreFileProvider.java │ │ │ └── ImageLoader.java │ │ │ ├── widget │ │ │ └── SquareFrameLayout.java │ │ │ ├── internal │ │ │ ├── ConfigParams.java │ │ │ ├── BaseRecyclerAdapter.java │ │ │ ├── PreviewResourceAdapter.java │ │ │ ├── Media.java │ │ │ ├── PreviewResourceActivity.java │ │ │ ├── AlbumsItemAdapter.java │ │ │ ├── ResourceItemAdapter.java │ │ │ └── DaguerreActivity.java │ │ │ ├── MimeType.java │ │ │ └── Daguerre.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── apk └── sample-debug.apk ├── images ├── apkqrcode.png ├── screenshot_preview.png ├── screenshot_select.png └── screenshot_select_album.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /sample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /daguerre/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':sample', ':daguerre' 2 | -------------------------------------------------------------------------------- /apk/sample-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/apk/sample-debug.apk -------------------------------------------------------------------------------- /images/apkqrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/images/apkqrcode.png -------------------------------------------------------------------------------- /images/screenshot_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/images/screenshot_preview.png -------------------------------------------------------------------------------- /images/screenshot_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/images/screenshot_select.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /images/screenshot_select_album.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/images/screenshot_select_album.png -------------------------------------------------------------------------------- /sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Daguerre 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/sample/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/sample/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/sample/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiujiecn/Daguerre/HEAD/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /daguerre/src/main/res/xml/daguerre_file_provider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /sample/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FA8CBE 4 | #FA8CBE 5 | #FA8CBE 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Nov 23 15:00:47 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-4.1-all.zip 7 | -------------------------------------------------------------------------------- /daguerre/src/main/java/com/jay/daguerre/provider/DaguerreFileProvider.java: -------------------------------------------------------------------------------- 1 | package com.jay.daguerre.provider; 2 | 3 | import android.support.v4.content.FileProvider; 4 | 5 | /** 6 | * Created by jay on 2017/12/29 上午11:57 7 | */ 8 | public class DaguerreFileProvider extends FileProvider { 9 | } 10 | -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /daguerre/src/main/res/menu/daguerre_action_mode.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /sample/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 8dp 6 | 176dp 7 | 16dp 8 | -------------------------------------------------------------------------------- /daguerre/src/main/res/menu/daguerre_action_camera.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /daguerre/src/main/res/menu/daguerre_action_video.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /daguerre/src/main/res/layout/daguerre_preview_resource_item.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /daguerre/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.jay.daguerre.fileprovider 4 | 全部 5 | 找不到相机应用 6 | 最多选择%1$d项 7 | 已选择%1$d项 8 | %1$d项 9 | -------------------------------------------------------------------------------- /daguerre/src/main/res/drawable/daguerre_ic_done.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /daguerre/src/main/res/values-v19/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /daguerre/src/main/res/drawable/daguerre_ic_badge_video.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /daguerre/src/main/res/drawable/daguerre_ic_video.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /daguerre/src/main/res/drawable/daguerre_btn_check_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /daguerre/src/main/java/com/jay/daguerre/widget/SquareFrameLayout.java: -------------------------------------------------------------------------------- 1 | package com.jay.daguerre.widget; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | import android.support.annotation.Nullable; 6 | import android.util.AttributeSet; 7 | import android.widget.FrameLayout; 8 | 9 | /** 10 | * Created by jay on 2017/11/24 下午5:26 11 | */ 12 | public class SquareFrameLayout extends FrameLayout { 13 | public SquareFrameLayout(@NonNull Context context, @Nullable AttributeSet attrs) { 14 | super(context, attrs); 15 | } 16 | 17 | @Override 18 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 19 | super.onMeasure(widthMeasureSpec, widthMeasureSpec); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /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 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /sample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /daguerre/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /daguerre/src/main/java/com/jay/daguerre/provider/ImageLoader.java: -------------------------------------------------------------------------------- 1 | package com.jay.daguerre.provider; 2 | 3 | 4 | import android.content.Context; 5 | import android.widget.ImageView; 6 | 7 | /** 8 | * Created by jay on 2017/11/23 下午4:12 9 | */ 10 | public interface ImageLoader { 11 | /** 12 | * 加载列表图片 13 | * 14 | * @param uri photo path 15 | */ 16 | void loadImage(Context context, ImageView imageView, String uri, boolean isGif, boolean isVideo); 17 | 18 | /** 19 | * 加载预览大图 20 | * 21 | * @param uri photo path 22 | */ 23 | void loadPreviewImage(Context context, ImageView imageView, String uri, boolean isGif, boolean isVideo); 24 | 25 | /** 26 | * 加载 Album 列表封面图片 27 | * 28 | * @param uri photo path 29 | */ 30 | void loadAlbumImage(Context context, ImageView imageView, String uri); 31 | } 32 | -------------------------------------------------------------------------------- /daguerre/src/main/res/drawable/daguerre_ic_camera.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /sample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 27 5 | buildToolsVersion '27.0.3' 6 | defaultConfig { 7 | applicationId "com.jay.daguerre.app" 8 | minSdkVersion 19 9 | targetSdkVersion 27 10 | versionCode 1 11 | versionName "1.0" 12 | vectorDrawables.useSupportLibrary = true 13 | } 14 | 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | 22 | } 23 | 24 | dependencies { 25 | implementation fileTree(include: ['*.jar'], dir: 'libs') 26 | implementation 'com.android.support:appcompat-v7:27.1.0' 27 | implementation project(':daguerre') 28 | implementation 'com.github.bumptech.glide:glide:4.3.1' 29 | } 30 | -------------------------------------------------------------------------------- /daguerre/src/main/res/drawable/daguerre_circle_checked.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 18 | 19 | -------------------------------------------------------------------------------- /daguerre/src/main/res/drawable/daguerre_circle_unchecked.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /daguerre/src/main/res/layout/daguerre_activity_preview_resource.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /daguerre/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 10 | 11 | 16 | 17 | 22 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 |