Skip to content
This repository was archived by the owner on Oct 13, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#Notice
-Picker.Builder(Context,Listener) has been replaced with (Context,Listener,themeResId) and it's highely recommended to use the new constructor

-``` onPickedSuccessfully(String[] paths)``` has been replaced with ``` onPickedSuccessfully(ArrayList<ImageEntry> images)```

-The sample in google play and screenshots are out-of-date , will update them on 1.2 or 1.3 version

Base on yazeed44 lib with lots of change and fix
MultiImagePicker
================

Expand Down
27 changes: 19 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
compileSdkVersion 28

defaultConfig {
applicationId "net.yazeed44.imagepicker.sample"
minSdkVersion 15
targetSdkVersion 23
minSdkVersion 17
targetSdkVersion 28
versionCode 3
versionName "1.3.1"
multiDexEnabled true
}
buildTypes {
release {
Expand All @@ -22,7 +22,10 @@ android {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

Expand All @@ -33,11 +36,19 @@ repositories {


dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':imagepicker')
compile('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':imagepicker')
implementation('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') {
transitive = true
}
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'androidx.appcompat:appcompat:1.1.0'
//Glide
implementation 'com.github.bumptech.glide:glide:4.10.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.10.0'
//Multidex
implementation 'androidx.multidex:multidex:2.0.1'
}

// Remove comment to exclude cwac-cam2 dependency to make the capture feature unavailable
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


<application

android:name="net.yazeed44.multiimagepicker.Application"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package net.yazeed44.multiimagepicker;

import androidx.multidex.MultiDexApplication;

public class Application extends MultiDexApplication {
}
29 changes: 14 additions & 15 deletions app/src/main/java/net/yazeed44/multiimagepicker/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@


import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.text.Html;
import android.text.Spanned;
import android.util.Log;
Expand All @@ -20,7 +22,7 @@
import com.afollestad.materialdialogs.MaterialDialog;
import com.bumptech.glide.Glide;

import net.yazeed44.imagepicker.model.ImageEntry;
import net.yazeed44.imagepicker.data.model.ImageEntry;
import net.yazeed44.imagepicker.sample.R;
import net.yazeed44.imagepicker.util.Picker;

Expand Down Expand Up @@ -56,11 +58,12 @@ private void setupRecycler() {


public void onClickPickImageSingle(View view) {

new Picker.Builder(this, this, R.style.MIP_theme)
.setPickMode(Picker.PickMode.SINGLE_IMAGE)
.build()
.startActivity();
Picker picker = new Picker.Builder(this, this)
.setLimitVideo(5)
.setLimitPhoto(5)
.setVideosEnabled(true)
.build();
picker.startActivity();
}

public void onClickPickImageMultipleWithLimit(View view) {
Expand Down Expand Up @@ -127,10 +130,6 @@ private void showAbout() {
}






@Override
public void onPickedSuccessfully(ArrayList<ImageEntry> images) {
mSelectedImages = images;
Expand Down Expand Up @@ -176,8 +175,8 @@ private void loadImage(final String path, final ImageView imageView) {
imageView.setLayoutParams(new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 440));

Glide.with(MainActivity.this)
.load(path)
.asBitmap()
.load(path)
.into(imageView);


Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
tools:context="net.yazeed44.multiimagepicker.MainActivity">

<Button
android:layout_width="match_parent"
Expand All @@ -30,7 +30,7 @@
android:onClick="onClickPickImageWithVideos"
android:text="@string/btn_pick_with_videos" />

<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/images_sample"

android:layout_width="match_parent"
Expand Down
37 changes: 26 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,33 +1,48 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {


repositories {
jcenter()

mavenCentral()
maven { url "https://clojars.org/repo/" }
maven { url "https://jitpack.io" }
google()
maven {
url 'https://maven.fabric.io/public'
}
maven {
name 'Sonatype SNAPSHOTs';
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'


dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}




allprojects {
repositories {
jcenter()

mavenCentral()
maven {
url "https://repo.commonsware.com.s3.amazonaws.com"
url "https://maven.google.com" // Google's Maven repository
}
maven { url "https://jitpack.io" }
google()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
}


task clean(type: Delete) {
delete rootProject.buildDir
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
org.gradle.daemon=true
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Jul 22 16:23:45 AST 2015
#Wed Feb 17 15:10:53 ICT 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
83 changes: 54 additions & 29 deletions imagepicker/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
apply plugin: 'com.android.library'


ext {
bintrayRepo = 'maven'
bintrayName = 'multi-image-picker'
publishedGroupId = 'net.yazeed44.imagepicker'
libraryName = 'MultiImage Picker'
artifact = 'imagepicker'

libraryDescription = 'This library is built-in gallery to pick multiple images or capture new photos , and retrieve the path in the code'
libraryDescription = 'This library is built-in gallery to pick multiple images or capture new photos, and retrieve the path in the code'

siteUrl = 'https://github.com/yazeed44/MultiImagePicker'
gitUrl = 'https://github.com/yazeed44/MultiImagePicker.git'
Expand All @@ -24,49 +25,73 @@ ext {

}


android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
compileSdkVersion 29

defaultConfig {
minSdkVersion 15
targetSdkVersion 23

minSdkVersion 17
targetSdkVersion 29
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}


compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}

repositories {
mavenCentral()
maven {
url "https://s3.amazonaws.com/repo.commonsware.com"
}
}



dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-annotations:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.octo.android.robospice:robospice:1.4.14'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.github.chrisbanes.photoview:library:1.2.3'
compile 'com.commonsware.cwac:cam2:0.2.3'
implementation 'androidx.recyclerview:recyclerview:1.2.0-beta01'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
implementation('com.octo.android.robospice:robospice:1.4.14') {
exclude group: 'org.apache.commons', module: 'commons-io'
}
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'

implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'com.github.chrisbanes:PhotoView:2.1.3'
implementation 'com.github.clans:fab:1.6.4'

api 'com.github.yalantis:ucrop:2.2.3'

//camera
implementation 'com.camerakit:camerakit:1.0.0-beta3.11'
implementation 'com.camerakit:jpegkit:0.1.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.30'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2-native-mt'

//Rx Java
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.20'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.9.0'
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
//Dagger
implementation 'com.google.dagger:dagger:2.31.2'
annotationProcessor 'com.google.dagger:dagger-compiler:2.31.2'
implementation 'net.sourceforge.streamsupport:streamsupport:1.7.3'
implementation 'com.jaeger.statusbarutil:library:1.5.1'
implementation 'com.github.florent37:runtime-permission:1.1.1'
implementation 'com.github.trantuananh1996:sweetAlert:1.0.2'
// architecture comp. navigation
implementation 'androidx.navigation:navigation-fragment:2.3.3'
implementation 'androidx.navigation:navigation-ui:2.3.3'
implementation 'androidx.navigation:navigation-runtime:2.3.3'
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'




//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package net.yazeed44.library;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
Expand Down
Loading