ImagePickerView

Additional

Language
Kotlin
Version
1.2.1 (Mar 8, 2020)
Created
Jun 17, 2019
Updated
Mar 8, 2020
Owner
lhoyong
Contributor
lhoyong
1
Activity
Badge
Generate
Download
Source code

Advertisement

ImagePickerView

This is Simple Android ImagePicker Library.

Support DayNight Mode.

OverView

ScreenShot

Setup

Add root build.gradle

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

Add the dependency

dependencies {
    implementation 'com.github.lhoyong:ImagePickerView:latestVersion'
}

Usage

Add ImagePickerView your Activity or Fragments Example.

When you Click on the Image, it will move to Detail Screen. If Long Click Image, start scale Animations and visible checkbox. Bul Already Clicked Images, can not move to Detail Screen.

ImagePickerView.Builder()
            .setup {
                config {
                    name { RESULT_NAME }
                    max { 5 }
                }
            }
            .start(this) // if used fragment, .start(requireContext())

Finish image select task, update ui for onActivityResult received data

For Example

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)
        if (resultCode == Activity.RESULT_OK) {
            val images = data?.getParcelableArrayListExtra<Uri>(RESULT_NAME)
            images?.let {
                (recycler_view.adapter as ImageAdapter).submitList(it)
            }
        }
    }

License

Copyright (C) 2020 lhoyong.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.