Image Picker with Customizable UI for Android, Pick an image from Gallery

Overview

Image Picker

A Image Picker Library for Android (Supports Android 12) with fully customizable UI

🔥 Features

  • Pick gallery images
  • Customizable and Material Design UI
  • Supports Android 12

🔥 RoadMap

  • Capture in Camera Mode (Work in Progress)
  • Videos Picker (In Future)

🔧 Installation

In settings.gradle file, add JitPack maven like below:

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

Add the following dependency in app build.gradle:

dependencies {
    implementation 'com.github.nafiskabbo:ImagePicker:1.0'
}

Usage

Define an ActivityResultLauncher class variable in Activity or Fragment.

private val launcher = registerImagePicker { images ->
    // Selected images are ready to use
    if(images.isNotEmpty()){
        val sampleImage = images[0]
        Glide.with(this@MainActivity)
             .load(sampleImage.uri)
             .into(imageView)
    }
}

Then, launch image picker when needed.

  • With default configuration:
launcher.launch()
  • With customize configuration:
val config = ImagePickerConfig(
    statusBarColor = "#000000",
    isLightStatusBar = false,
    isFolderMode = true,
    isMultipleMode = true,
    maxSize = 10,
    rootDirectory = Config.ROOT_DIR_DOWNLOAD,
    subDirectory = "Photos",
    folderGridCount = GridCount(2, 4),
    imageGridCount = GridCount(3, 5),
    // See more at configuration attributes table below
)

launcher.launch(config)

Configuration attributes

Name Description Default
statusBarColor Status bar color (require API >= 21) #000000
isLightStatusBar Set status bar to light/dark mode to change it's content to dark/light (require API >= 21) false
toolbarColor Toolbar color #212121
toolbarTextColor Toolbar text color #FFFFFF
toolbarIconColor Toolbar icon color #FFFFFF
backgroundColor Background color #424242
progressIndicatorColor Loading indicator color #009688
selectedIndicatorColor Selected image's indicator color #1976D2
isCameraOnly (Work in Progress) Open camera, then capture and return an image false
isMultipleMode Allow to select multiple images true
isFolderMode Show images by folders false
folderGridCount Set folder colums for portrait and landscape orientation GridCount(2, 4)
imageGridCount Set image colums for portrait and landscape orientation GridCount(3, 5)
doneTitle Done button title DONE
folderTitle Toolbar title for folder mode (require FolderMode = true) Albums
imageTitle Toolbar title for image mode (require FolderMode = false) Photos
isShowCamera (Work in Progress) Show camera button true
isShowNumberIndicator Show selected image's indicator as number false
isAlwaysShowDoneButton Show done button even though no images've been selected yet false
rootDirectory Public root directory of captured image, should be one of: RootDirectory.DCIM, RootDirectory.PICTURES, RootDirectory.DOWNLOADS. RootDirectory.DCIM
subDirectory Root directory's sub folder of captured image Application name
maxSize Max images can be selected Int.MAX_VALUE
limitMessage Message to be displayed when total selected images exceeds max size ...
selectedImages List of images that will be shown as selected in ImagePicker Empty list

💥 Compatibility

  • Library - Android Marshmallow 5.0+ (API 21)

✔️ Changelog

Version: 1.0

  • Initial Build

📃 Libraries Used

Contributors


nafiskabbo

License

Copyright (c) 2021 Nafis Islam Kabbo

You might also like...
Flickable ImageView for Android. It's like a view of twitter's detail image.
Flickable ImageView for Android. It's like a view of twitter's detail image.

FlickableView Flickable ImageView for Android. It's like a view of twitter's detail image. It's possible that other views animate with FlickableView.

Android library written in kotlin that add a noise effect to image.
Android library written in kotlin that add a noise effect to image.

NoiseView With NoiseView you can easily add a noise effect to your image. See demo on YouTube Setup The library is pushed to jCenter() as an AAR, so y

This is a library for make auto slide image in android
This is a library for make auto slide image in android

Auto Image Slider Screenshot Image Slider Default Image Slider With Custom Adapter Usage Add ImageSlider to your layout

Android Library for cropping an image at ease.
Android Library for cropping an image at ease.

Cropper - Android Image Cropper Android Image Cropper Powerful (Zoom, Rotation, Multi-Source); Customizable (Shape, Limits, Style); Optimized (Async,

A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows
A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows

A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows.Provides fast canvas draw as no renderscript needed .The similar shadow blurred effects can also be seen in iOS Music App.

Add curve at bottom of image views and relative layouts.
Add curve at bottom of image views and relative layouts.

Crescento Android library that adds a curve at the below of image views and relative layouts. CrescentoImageView and CrescentoContainer are the image

Custom ImageView to generate captcha image.
Custom ImageView to generate captcha image.

CaptchaImageView Custom ImageView to generate captcha image. Add CaptchaImageView to your layout test.jinesh.captchaimageviewlib.CaptchaImageView

A photoView to scale image and finish activity,高仿微信可拖拽返回PhotoView
A photoView to scale image and finish activity,高仿微信可拖拽返回PhotoView

DragPhotoView(English) 高仿微信可拖拽返回PhotoView 基于 PhotoView ##下载APK体验 特性 拖拽缩放图片,并且结束Activity 其他PhotoView所有特性如下: Out of the box zooming, using multi-touch a

Custom ImageView for android with polygon shape (Android)
Custom ImageView for android with polygon shape (Android)

PolygonImageView Create a custom ImageView with polygonal forms. Usage To use PolygonImageView, add the module into your project and start to build xm

Releases(1.2)
Owner
Android App Developer. I am an expert at Java, Kotlin, Android Studio, Web Development, Machine Learning. I am interested in programming and it is my passion.
null
A gallery used to host an array of images

ImageGallery Overview A gallery used to host an array of images You can add one or more images to the gallery Support for using Palette to set the bac

Etienne Lawlor 645 Dec 18, 2022
Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻

BigImageViewer Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling

Piasy 3.9k Dec 30, 2022
Customizable Android full screen image viewer for Fresco library supporting "pinch to zoom" and "swipe to dismiss" gestures. Made by Stfalcon

This project is no longer supported. If you're able to switch from Fresco to any other library that works with the Android's ImageView, please migrate

Stfalcon LLC 1.8k Dec 19, 2022
DMIV aims to provide a flexible and customizable instrument for automated images moving on display. It provides scroll, gyroscope or time based moving. But you can create your own evaluator.

DexMovingImageView DMIV aims to provide a flexible and customizable instrument for automated images moving on display. It provides scroll, gyroscope o

Diego Grancini 310 Feb 7, 2022
Android library to generate image avatar from the first letter of a username. Letter avatar like Gmail Android best practice

AvatarImageGenerator Generate first letter avatar Image like gmail's contact avatar. It generates an drawable that can be be set to an ImageView. Inst

Korir Amos 61 Sep 25, 2022
Android widget for cropping and rotating an image.

Cropper The Cropper is an image cropping tool. It provides a way to set an image in XML and programmatically, and displays a resizable crop window on

Edmodo 2.9k Nov 14, 2022
Android ImageView replacement which allows image loading from URLs or contact address book, with caching

Smart Image View for Android SmartImageView is a drop-in replacement for Android’s standard ImageView which additionally allows images to be loaded fr

James Smith 1.3k Dec 24, 2022
Replacement for deprecated official Android crop image function

The MIT License (MIT) Copyright (c) 2012 Jan Muller Permission is hereby granted, free of charge, to any person obtaining a copy of this software and

Jan Muller 561 Nov 25, 2022
Custom ImageView for moving image around the screen (Android)

MovingImageView Create a custom ImageView for moving image around the screen. Usage To use MovingImageView, add the module into your project and start

Albert Grobas 819 Nov 18, 2022