? SIP (simple image picker)
Migration from
With Dialog | Gallery Only | Camera Only | Crop
?Usage
-
Gradle dependency:
allprojects { repositories { maven { url "https://jitpack.io" } } }
If you are yet to Migrate on AndroidX, Use support build artifact:
implementation 'com.github.vickykdv:simple-image-picker:TAG'
?Simpe Usage
-
Pick image using Gallery
val launcherEIP = registerEIP { //get file path , Simple use with 1 lines code val file = File(it.path!!) //and load to image or send file to server binding.img.setImageURI(Uri.parse(file.absolutePath)) }
-
for show dialog
view.setOnClickListener { view -> launcherEIP.launchDialog() }
-
for galery only
view.setOnClickListener { view -> launcherEIP.launchGalery() }
-
for camera only
view.setOnClickListener { view -> launcherEIP.launchCamera() }
-
With crop config
//Call before launch val config = EIPConfig( isCropAspectRatio = true, cropRatio = RATIO.WIDE )
-
and add in launch contructor
view.setOnClickListener { view -> launcherEIP.launchDialog(config) }
-
replace change dialog icon color if u want
<color name="SIPiconColor">#673AB7</color>
? Thx for library
- uCrop https://github.com/Yalantis/uCrop
- Compressor https://github.com/zetbaitsu/Compressor
Let us know!
We’ll be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the library.
License
Copyright 2019-2022, Vicky KDV
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.