A WhatsApp Style Image Picker
Pix
Pix is a Whatsapp image picker replica. with this you can integrate a image picker just like whatsapp.
Demo
Usage
Pix.start(Context, //Activity or Fragment Instance
RequestCode, //Request code for activity results
NumberOfImagesToSelect); //Number of images to restict selection count
or just use
Pix.start(Context,
RequestCode);
for fetching only a single picture.
Use onActivityResult method to get results
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == Activity.RESULT_OK && requestCode == RequestCode) {
ArrayList<String> returnValue = data.getStringArrayListExtra(Pix.IMAGE_RESULTS);
}
}
Customise
include these items in colors.xml with custom color codes
<resources>
<color name="colorPrimaryPix">#075e54</color>
<color name="colorPrimaryLightPix">#80075e54</color>
</resources>
Thanks to
- [Fresco]
- [FastScroll]
- [Header-decor]
Download
compile 'com.fxn769:pix:1.0.5'
or Maven:
<dependency>
<groupId>com.fxn769</groupId>
<artifactId>pix</artifactId>
<version>1.0.5</version>
<type>pom</type>
</dependency>
or ivy:
<dependency org='com.fxn769' name='pix' rev='1.0.5'>
<artifact name='pix' ext='pom' ></artifact>
</dependency>
Snapshots of the development version are available in [Sonatype's snapshots
repository][snap].