vansikrishna/Multimager


Multi Image Picker and Multi Image Capture Library

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.vansikrishna:Multimager:1.0.8'
	}
	dependencies {
		implementation("com.github.vansikrishna:Multimager:1.0.8")
	}
	<dependency>
	    <groupId>com.github.vansikrishna</groupId>
	    <artifactId>Multimager</artifactId>
	    <version>1.0.8</version>
	</dependency>

                            
    libraryDependencies += "com.github.vansikrishna" % "Multimager" % "1.0.8"
        
        

                            
    :dependencies [[com.github.vansikrishna/Multimager "1.0.8"]]
        
        

Readme


Android Arsenal

Multimager

Multi Image Picker and Multi Image Capture Demo app This is a sample demonstration for multiple images capture as well as multiple image picker. UX/UI can be styled with any color with relativity to Material Design. The demo shows tinting multiple views based on theme color!!

Demo App

<a href='https://play.google.com/store/apps/details?id=com.vlk.multimager.example&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img style="width:200" alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/></a>

Library

Add the jitpack repo to your repositories section in root level build.gradle

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Add the dependencies to the app level build.gradle

dependencies {
    compile 'com.github.vansikrishna:Multimager:1.0.8'
}

Screenshots

Create intent for multi-selection

Intent intent = new Intent(this, GalleryActivity.class);
Params params = new Params();
params.setCaptureLimit(10);
params.setPickerLimit(10);
params.setToolbarColor(selectedColor);
params.setActionButtonColor(selectedColor);
params.setButtonTextColor(selectedColor);
intent.putExtra(Constants.KEY_PARAMS, params);
startActivityForResult(intent, Constants.TYPE_MULTI_PICKER);

Create intent for multi-capture

Intent intent = new Intent(this, MultiCameraActivity.class);
Params params = new Params();
params.setCaptureLimit(10);
params.setToolbarColor(selectedColor);
params.setActionButtonColor(selectedColor);
params.setButtonTextColor(selectedColor);
intent.putExtra(Constants.KEY_PARAMS, params);
startActivityForResult(intent, Constants.TYPE_MULTI_CAPTURE);

Get the result in the onActivityResult() callback

protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
    super.onActivityResult(requestCode, resultCode, intent);
    if (resultCode != RESULT_OK) {
        return;
    }
    switch (requestCode) {
        case Constants.TYPE_MULTI_CAPTURE:
            ArrayList<Image> imagesList = intent.getParcelableArrayListExtra(Constants.KEY_BUNDLE_LIST);
            break;
        case Constants.TYPE_MULTI_PICKER:
            ArrayList<Image> imagesList = intent.getParcelableArrayListExtra(Constants.KEY_BUNDLE_LIST);
            break;
    }
}

Default style

The default style is green, but it can be modified with any set colors. One for normal state and another for pressed state. setViewsColorStateList() in Utils class will do the job.