Need help with PixImagePicker?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Global Rank
#73,846
Topics of expertise
music-v...
image-v...
music-l...
image-m...
visuali...
Kotlin
Java
Location
Jaipur
531 Stars 160 Forks Apache License 2.0 280 Commits 9 Opened issues

Description

Pix is a Whatsapp image picker replica. with this, you can integrate an image picker just like WhatsApp.

Services available

!
?

Need anything else?

Contributors list

No Data

Preview image

Pix (WhatsApp Style Image and Video Picker)

Pix is a WhatsApp image picker replica. with this you can integrate a image picker just like WhatsApp.

Codacy Badge Pix Image Picker xscode

New in PixImagePicker

  1. Androidx Camera API integration
  2. Scoped storage to support Android Version 30
  3. Minimum SDK from 19 to 21
  4. Migration from Java to Kotlin
  5. Ability to use it as a Fragment
  6. Re-structuring from scratch

Demo

Usage

set configuration as ```kotlin val options = Options().apply{ ratio = Ratio.RATIO_AUTO //Image/video capture ratio count = 1 //Number of images to restrict selection count spanCount = 4 //Number for columns in grid path = "Pix/Camera" //Custom Path For media Storage isFrontFacing = false //Front Facing camera on start videoDurationLimitInSeconds = 10 //Duration for video recording mode = Mode.All //Option to select only pictures or videos or both flash = Flash.Auto //Option to select flash type preSelectedUrls = ArrayList() //Pre selected Image Urls }

Ratio can be
```kotlin
  RATIO_4_3, RATIO_16_9, RATIO_AUTO

Mode to to select the media type can be as

kotlin
  All, Picture, Video
Then pass this config to the pix fragment either via
kotlin
     addPixToActivity(R.id.container, options) {
          when (it.status) {
              PixEventCallback.Status.SUCCESS -> //use results as it.data
              PixEventCallback.Status.BACK_PRESSED -> // back pressed called
          }
      }
or plain fragment can be retrieved via
kotlin
private val pixFragment = pixFragment(options)
The results can be retrieved via the constructor callback from the fragment
kotlin
    pixFragment(options){
        when (it.status) {
            PixEventCallback.Status.SUCCESS -> //use results as it.data
            PixEventCallback.Status.BACK_PRESSED -> // back pressed called
        }
    }
Or can be retrieved by anywhere in the Application from the state flow eventbus
kotlin
    PixBus.results {
        when (it.status) {
             PixEventCallback.Status.SUCCESS ->  //use results as it.data
             PixEventCallback.Status.BACK_PRESSED -> // back pressed called
        }
    }
For detailed usage kindly refer to the below samples - FragmentSample for Plain Fragment implementation - NavControllerSample for Fragments with NavController implementation - ViewPager2Sample for Fragments with ViewPager2 implementation

Customise

Theme

include these items in colors.xml with custom color codes

xml

    #E53935
    #075e54
    #80075e54
    #ffffff
    #807f7f

Thanks to

Backers

Become a backer and help us sustain our activities! 🙏🙏

Download

Download or grab via Gradle:

include in app level build.gradle

groovy
 repositories {
    mavenCentral()
 }
groovy
 implementation  'io.ak1.pix:piximagepicker:1.6.2'
or Maven:
xml

  io.ak1.pix
  piximagepicker
  1.6.2
  pom

or ivy:
xml

  

Find docs for old versions in wiki 1.5.6 and 1.2.5

License

Licensed under the Apache License, Version 2.0, click here for the full license.

Author & support

This project was created by Akshay Sharma.

If you appreciate my work, consider buying me a cup of :coffee: to keep me recharged :metal: by PayPal

I love using my work and I'm available for contract work. Freelancing helps to maintain and keep my open source projects up to date!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.