Tuesday, June 12, 2018

Jamun-Gallery


Gallery have splendid UI Components with Single and Multi files Selection Mode for android Developers to give there app a A Rich look With with custom picker functionality to cover up maximum media type like Audio, Files (Docs, Text etc) and Images.


What's New? (0.0.1)


  • Stable Official Version for Developers and Live Apps.
  • Easy Calling Mechanism with Instant reply via onActivityResult.
  • Need less calls with many customs Tags in Intent Object to reach maximum developer satisfaction.
  • Compatible With Camera Library for More Efficent Working;

Why this library?


  • This library Competible with all screen sizes and device (Tab with 7' inches and 10'inches).
  • Library support both orientation that is portrait and landscape.
  • Its Calling feature is very simple and easy to use.
  • You don't need to add Multiple libraries and UI components, it have such Components inside that make Quality.
  • Library is Customizable for Enable Features like Only Audio, Only Files, and Only Images view.

Quality Measures? for (0.0.1)


The following apps are using this library without facing any kind of Bugs.



Jamun-Gallery Preview


Activity View Bottom Sheet View
jamun_gallery_activity jamun_gallery_bottom

Working Preview


gallery


Gradle Configuration


Add the dependency


Step 1. Add the jCenter repository to your build file. Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
        mavenCentral()
  }
}

Step 2. Add the dependency

dependencies {
     compile 'tk.jamun.ui:gallery:0.0.1'
}

Maven Config

<dependency>
  <groupId>tk.jamun.ui</groupId>
  <artifactId>gallery</artifactId>
  <version>0.0.1</version>
  <type>aar</type>
</dependency>



How to Implement


Once the project has been added to gradle, You can use these lines of code to configure pickers....


Activity View


Step 1. Define Intent Object

Simple Object declaration :

**Single**
Intent intent = new Intent(this, ActivityGallery.class)
                        .putExtra(GALLERY_INTENT_COME_FOR, GALLERY_TYPE_IMAGE)// Means type either IMAGE, AUDIO, FILES and all
                        .putExtra(GALLERY_INTENT_MODE, GALLERY_MODE_SINGLE);// Means Mode GALLERY_MODE_SINGLE or MODE_MULIT

**Multi**
//or For All-In-One

Intent intent =new Intent(this, ActivityGallery.class)
                        .putExtra(GALLERY_INTENT_COME_FOR, GALLERY_TYPE_ALL)
                        .putExtra(GALLERY_INTENT_MODE, GALLERY_MODE_MULTI);// Means Mode GALLERY_MODE_SINGLE or MODE_MULIT

Step 2. Start Module By Calling


This method is very common to Android Developer, Very easy calling way to Start an activity help you same for calling this Picker :

startActivityForResult(intent, ACTION_REQUEST_GALLERY);

Step 3. Get Result from Picker


 @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == RESULT_OK) {
            switch (requestCode) {
                case ACTION_REQUEST_GALLERY:
                    if (data.getIntExtra(GALLERY_INTENT_MODE, GALLERY_MODE_SINGLE) == GALLERY_MODE_SINGLE) {
                        ModelChild modelChild = data.getParcelableExtra(GALLERY_INTENT_FOR_MODEL);
                        if (modelChild != null)
                            try {
                            file = new File(modelChild.getFilePath());
                                startActivityForResult(new Intent(ActivityCameraGallery.this, ActivityCamera.class)
                                                .putExtra(InterfaceUtils.INTENT_COME_FROM, LIBRARY_COME_FROM_GALLERY)
                                                .putExtra(RESULT_IMAGE_PATH, file.getAbsolutePath()),
                                        ACTION_REQUEST_CAMERA);
                            } catch (Exception ignored) {
                            }
                    } else {
                        ArrayList<ModelChild> childArrayList = data.getParcelableArrayListExtra(GALLERY_INTENT_FOR_MODEL);
                        for (ModelChild modelChild : childArrayList) {
                             file = new File(modelChild.getFilePath());
                        }
                    }
                    break;
            }
        }
    }


Bottom Sheet View


Step 1. Define Intent Object

Object Declaration and Binding Response Listener:


**Single**
 new PickerMulti().setThings(this, getSupportFragmentManager(), GALLERY_TYPE_IMAGE,
                GALLERY_MODE_SINGLE).onClickListener(new InterfaceGallery.InterfaceSingleModeItemClickListener() {
            @Override
            public void getResponse(ModelChild modelChild) {

            }
        }).setColumnCount(4).showPicker();
        
**Multi**
//or For All-In-One

 new PickerMulti().setThings(this, getSupportFragmentManager(), GALLERY_TYPE_ALL,
                GALLERY_MODE_MULTI).onSubmitClickListener(new InterfaceGallery.InterfaceMultiModeItemClickListener() {
            @Override
            public void getResponse(ArrayList<ModelChild> selectedArrayList) {

            }
        }).showPicker();

Gallery Customize


Intent Object provide you custom functionality to work Module according to your requirement :


Set Title of the Gallery


**Activity View**
intent.putExtra(INTENT_SCANNER_ACTIVITY_NAME, "Title of the Scanner Activity");

or 

**Bottom Sheet View**
new PickerMulti().setTitle();

Set Column Count of the Gallery


**Activity View**
intent.putExtra(GALLERY_INTENT_COLUMN_COUNT, COUNT);

or 

**Bottom Sheet View**
new PickerMulti().setColumnCount();



Dependency


  • Goole Vision v15.0.2
  • SDK Version 15 to 27

Credits


Desgin & Developed by : Jatin Sahgal (Linkedin & Website)

More Library under Jamun


  • Pickers Pickers Library provide you a set of Pickers like Country, Language, Share and Intent Chooser.

  • Country-Pickers allow you to access Country picking functionality with great UI/UX design, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property. Library consists of updated collection of country name, code and there flags. We are using APIs base structure to avoid increase in the size of apk due to flag Images. This module Maintain the database so that you don't need to call APIs again and again rather than you can choose when to refresh the Database and fetch new real time data.

  • Language-Pickers provides you read-made Language picker which is easy to use and comes with great UI/UX, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property.

  • Calendar is a collection of Beautiful Activities which help others to make there Fully Custom Calendar View with Single and Multi Date Picker Functionality.

  • Scanner is a collection of Beautiful Activity which help others to make there own Custom QR/Barcode Scanner.

  • Volley Library is a set of Custom Classes with UI components for network programming, integration and transaction handling in a better and standard way. This will help developers for making quality use of volley library.

  • UI library is a set of UI Views, Custom Component and Collection of Helper Classes which help Developer for making quality Product. Such as Camera, Gallery, Number of Pickers, Calendar, Date Pickers, Dialogs and many more Heler UI and Backend Component.

  • Camera library provide you Custom Complete Camera view with full features like Flash, Rotation, Gallery Picker, Focus, Tap to capture, Confirmation window and last but not least croping feature. It also provide you file path in return so that developer can feel a friendly handy way to Deal After.

  • Gallery have some Beautiful UI Components and Multi files Mode for android Developers to give there app a A Rich look With single and Multi picker Functionality.

  • Elements Library provide you a custom set of Android Elements that have custom views and properties like CircularImageView or CircularNetworkImageView and many more.

  • Browser Library provide you two type Single Pager and Multi Pager In-APP Browser Functionality with Event Handling and Functions to Customize Views. It also provide you Copy to clipboard, Open in Browser and share link feature in-Bulit.


License


Copyright (c) 2018 Jatin Sahgal

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.

Jamun-Scanner


Scanner is a collection of Beautiful Activity which help others to make there own Custom QR/Barcode Scanner.

What's New? (0.0.1)


  • Stable Official Version for Developers and Live Apps.
  • Tags to Customize Library for Any kind like Only Barcode or Only QR or All-in-One
  • Easy Calling Mechanism with Instant reply via onActivityResult.
  • Need less calls with many customs Tags in Intent Object to reach maximum developer satisfaction.

Why this library?


  • This library Competible with all screen sizes and device (Tab with 7' inches and 10'inches).
  • Library support both orientation that is portrait and landscape.
  • Its Calling feature is very simple and easy to use.
  • You don't need to add Multiple libraries and UI components, it have such Components inside that make Quality.
  • Library is Customizable for Only Barcode or Only QR or Any QR/Barcode Related Types.

Quality Measures? for (0.0.1)


The following apps are using this library without facing any kind of Bugs.




Jamun-Scanner Preview



Window View Working Preview
jamun_scanner scanner

Gradle Configuration


Add the dependency

dependencies {
     compile 'tk.jamun.ui:scanner:0.0.1'
}

Maven Config


<dependency>
  <groupId>tk.jamun.ui</groupId>
  <artifactId>scanner</artifactId>
  <version>0.0.1</version>
  <type>aar</type>
</dependency>



How to Implement


Once the project has been added to gradle, You can use these lines of code to configure pickers....

Step 1. Define Intent Object


Simple Object declaration :
Intent intent = new Intent(ActivityScannerSample.this, ActivityScanner.class);

Step 2. Start Module By Calling


This method is very common to Android Developer, Very easy calling way to Start an activity help you same for calling this Picker :
startActivityForResult(intent, ACTION_QR_READER);

Step 3. Get Result from Picker

Method provide you result of Picker : 

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
 if (requestCode == ACTION_QR_READER) {
     if (resultCode == RESULT_OK) {
        String qrCode = data.getStringExtra(INTENT_FOR_CODE);
     }
  }
}

Picker Customize


Intent Object provide you custom functionality to work Module according to your requirement :

Set Title of the Date Picker


By Defining this tag with String can help you setting Title of the date Picker.
intent.putExtra(INTENT_SCANNER_ACTIVITY_NAME, "Title of the Scanner Activity");

Set Type of Scanner


By Defining this tag you can set Your Scanner Behave, There are two of its Kind :-
  • SCANNER_TYPE_BARCODE : for Bracode
  • SCANNER_TYPE_QR : for QR
intent.putExtra(INTENT_SCANNER_TYPE, SCANNER_TYPE_BARCODE);

Set Type of Scanner


By Defining this tag you can set Your Scanner Behave, There are two of its Kind :-
For All Format : --
  • **TYPE_ALL_FORMAT
For BARCODE Format : --
  • **YPE_BARCODE_CODE_128
  • **TYPE_BARCODE_CODE_39
  • **TYPE_BARCODE_CODE_93
  • **TYPE_BARCODE_CODABAR
  • **TYPE_BARCODE_EAN_13
  • **TYPE_BARCODE_EAN_8
  • **TYPE_BARCODE_ITF
  • **TYPE_BARCODE_UPC_A
  • **TYPE_BARCODE_UPC_E
For QR Format : --
  • **TYPE_QR_CODE
  • **TYPE_QR_PDF417
  • **TYPE_QR_DATA_MATRIX
  • **TYPE_QR_AZTEC
intent.putExtra(INTENT_SCANNER_TYPE, TYPE_ALL_FORMAT);



Dependency


  • Goole Vision v15.0.2
  • SDK Version 15 to 27

Credits


Desgin & Developed by : Jatin Sahgal (Linkedin & Website)

More Library under Jamun


  • Pickers Pickers Library provide you a set of Pickers like Country, Language, Share and Intent Chooser.
  • Country-Pickers allow you to access Country picking functionality with great UI/UX design, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property. Library consists of updated collection of country name, code and there flags. We are using APIs base structure to avoid increase in the size of apk due to flag Images. This module Maintain the database so that you don't need to call APIs again and again rather than you can choose when to refresh the Database and fetch new real time data.
  • Language-Pickers provides you read-made Language picker which is easy to use and comes with great UI/UX, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property.
  • Calendar is a collection of Beautiful Activities which help others to make there Fully Custom Calendar View with Single and Multi Date Picker Functionality.
  • Scanner is a collection of Beautiful Activity which help others to make there own Custom QR/Barcode Scanner.
  • Volley Library is a set of Custom Classes with UI components for network programming, integration and transaction handling in a better and standard way. This will help developers for making quality use of volley library.
  • UI library is a set of UI Views, Custom Component and Collection of Helper Classes which help Developer for making quality Product. Such as Camera, Gallery, Number of Pickers, Calendar, Date Pickers, Dialogs and many more Heler UI and Backend Component.
  • Camera library provide you Custom Complete Camera view with full features like Flash, Rotation, Gallery Picker, Focus, Tap to capture, Confirmation window and last but not least croping feature. It also provide you file path in return so that developer can feel a friendly handy way to Deal After.
  • Gallery Library have splendid UI Components with Single and Multi files Selection Mode for android Developers to give there app a A Rich look With with custom picker functionality to cover up maximum media type like Audio, Files (Docs, Text etc) and Images.
  • Elements Library provide you a custom set of Android Elements that have custom views and properties like CircularImageView or CircularNetworkImageView and many more.
  • Browser Library provide you two type Single Pager and Multi Pager In-APP Browser Functionality with Event Handling and Functions to Customize Views. It also provide you Copy to clipboard, Open in Browser and share link feature in-Bulit.

License


Copyright (c) 2018 Jatin Sahgal

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.

Sunday, June 10, 2018

Jamun-Calendar


A developer handy Tools.

Calendar is a collection of Beautiful Activities which help others to make there Fully Custom Calendar View with Single and Multi Date Picker Functionality.

Dual Date Picker


Feature Dual date picker provide fully custom selection between dates, months and year. A very neat and clean view for Your User to Get maximum satisfaction either by UI or UX, And Plus points for developer have with full custom handy tags, for developer maximum satisfaction.


Before Selection After Selection
jamun_calendar_dual jamun_calendar_dual_selection

Single Date Picker


Feature single Picker is provide you date selection functionality with fully custom tags. Another UI/UX combination for to enhacne app quality and satisfaction.

Selected Date Picker Custom Date Picker
jamun_calendar_single jamun_calendar_single_custom_selection

What's New? (0.0.1)


  • Stable Official Version for Developers and Live Apps.
  • Very Light Weight and Developer app theme Oriented
  • Easy Calling Mechanism with Instant reply via onActivityResult
  • Provide you very flexible wat to Customize the whole Module.
  • Need less calls with many customs Tags to reach maximum developer satisfaction.

Quality Measures? for (0.0.1)


The following apps are using this library without facing any kind of Bugs.



Gradle Configuration


Add the dependency
dependencies {
        compile 'tk.jamun.ui:calendar:0.0.1'
}

Maven Config


<dependency>
  <groupId>tk.jamun.ui</groupId>
  <artifactId>calendar</artifactId>
  <version>0.0.1</version>
  <type>aar</type>
</dependency>



How to Implement


Once the project has been added to gradle, You can use these lines of code to configure pickers....

Calling Code


Three simple steps to Take care of whole Modele :

Step 1. Define Intent Object


Simple Object declaration to Define Type of Picker you want, There are two Types :
A) Single Date Picker
B) Multi or Dual Date Picker
**Single Date Picker**
Intent intent = new Intent(getContext(), ActivityCalenderSingle.class);

or

**Multi Date Picker**
Intent intent = new Intent(this, ActivityCalenderDual.class);


Step 2. Start Module By Calling


This method is very common to Android Developer, Very easy calling way to Start an activity help you same for calling this Picker :
startActivityForResult(intent, INTENT_CALENDER_SINGLE_PICKER);

Step 3. Get Result from Picker


@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == INTENT_CALENDER_DUAL_PICKER) {
    if (resultCode == RESULT_OK) {
       modelCalenderFrom = data.getParcelableExtra(INTENT_CALENDER_DATA_ONE);
       modelCalenderTo = data.getParcelableExtra(INTENT_CALENDER_DATA_TWO);
       updateDate();
    }
} else if (requestCode == INTENT_CALENDER_SINGLE_PICKER) {
    if (resultCode == RESULT_OK) {
          modelCalender = data.getParcelableExtra(INTENT_CALENDER_DATA);
    }
}

Result Provide you ModelCalendar Object, that have all required Object to Full fill any Developer Request. It also have Calendar Object for More satisfaction.



Picker Customize


Intent Object provide you custom functionality to work Module according to your requirement :
  • Set Title of the Date Picker
By Defining this tag with String can help you setting Title of the date Picker.
intent.putExtra(INTENT_CALENDER_TITLE, "Title of the Picker");
  • Set Predefined Date
To set selected Date in Calendar, Also used if user already selected Date, so this will help you user to Navigate Directly to Selected Once :
**Single Date Picker**

intent.putExtra(INTENT_CALENDER_DATE, modelCalender.getDate());
intent.putExtra(INTENT_CALENDER_MONTH, modelCalender.getMonth());//(0 to 11)
intent.putExtra(INTENT_CALENDER_YEAR, modelCalender.getYear());

**Multi Date Picker**
intent.putExtra(INTENT_CALENDER_YEAR_FROM, modelCalenderFrom.getYear());
intent.putExtra(INTENT_CALENDER_MONTH_FROM, modelCalenderFrom.getMonth()); //(0 to 11)
intent.putExtra(INTENT_CALENDER_DATE_FROM, modelCalenderFrom.getDate());
intent.putExtra(INTENT_CALENDER_YEAR_TO, modelCalenderTo.getYear());
intent.putExtra(INTENT_CALENDER_MONTH_TO, modelCalenderTo.getMonth());//(0 to 11)
intent.putExtra(INTENT_CALENDER_DATE_TO, modelCalenderTo.getDate());       

  • Set Minimum or Maximum Date Today
There is a provisioin in this library to start your Picker selection from Today either Today date as Starting date or Ending date :
**Minimum Date Today**
intent.putExtra(INTENT_CALENDER_SET_MIN_DATE_TODAY, true);

**Maximum Date Today**
intent.putExtra(INTENT_CALENDER_SET_MAX_DATE_TODAY, true);
Warning Note : Don't set them both at once, it may be crash your app;
  • Set Maximum or Minimum Year, Date, Month for selection Upto
To bound your User Selection, just need to call intent with some Tags and Thats it Boundation Applied:
**Maximum Year Upto**
intent.putExtra(INTENT_CALENDER_MAX_YEAR, currentYear + 10(upto Value));
intent.putExtra(INTENT_CALENDER_MAX_MONTH, Month(upto Value));//(0 to 11)
intent.putExtra(INTENT_CALENDER_MAX_DATE, date(upto Value));

**Minimum Year Upto**
intent.putExtra(INTENT_CALENDER_MIN_YEAR, currentYear - 10(Above Value));
intent.putExtra(INTENT_CALENDER_MIN_MONTH, Month(Above Value));//(0 to 11)
intent.putExtra(INTENT_CALENDER_MIN_DATE, date(Above Value));

or For setting Both min and max Together
intent.putExtra(INTENT_CALENDER_MAX_YEAR, currentYear + 10(upto Value));
intent.putExtra(INTENT_CALENDER_MAX_MONTH, Month(upto Value));//(0 to 11)
intent.putExtra(INTENT_CALENDER_MAX_DATE, date(upto Value));
intent.putExtra(INTENT_CALENDER_MIN_YEAR, currentYear - 10(upto Value));
intent.putExtra(INTENT_CALENDER_MIN_MONTH, Month(Above Value));//(0 to 11)
intent.putExtra(INTENT_CALENDER_MIN_DATE, date(Above Value));

Also Used as
Either,
intent.putExtra(INTENT_CALENDER_SET_MAX_DATE_TODAY, true);

intent.putExtra(INTENT_CALENDER_MIN_YEAR, currentYear - 10(upto Value));
intent.putExtra(INTENT_CALENDER_MIN_MONTH, Month(Above Value));//(0 to 11)
intent.putExtra(INTENT_CALENDER_MIN_DATE, date(Above Value));

Or,
intent.putExtra(INTENT_CALENDER_SET_MIN_DATE_TODAY, true);

intent.putExtra(INTENT_CALENDER_MAX_YEAR, currentYear + 10(upto Value));
intent.putExtra(INTENT_CALENDER_MAX_MONTH, Month(upto Value));//(0 to 11)
intent.putExtra(INTENT_CALENDER_MAX_DATE, date(upto Value));


Warning Note : Don't call with Both INTENT_CALENDER_SET_MAX_DATE_TODAY or with INTENT_CALENDER_SET_MIN_DATE_TODAY together with this, it may be crash your app;



Working Example for Date Of Birth Selection


 Intent intentType = new Intent(getContext(), ActivityCalenderSingle.class);
 //used if user already selected Date, so this will help you user to Navigate Directly to Selected Once
 if (modelCalender.getDate() != 0) {
    intentType.putExtra(INTENT_CALENDER_DATE, modelCalender.getDate());
    intentType.putExtra(INTENT_CALENDER_MONTH, modelCalender.getMonth());//(0 to 11)
    intentType.putExtra(INTENT_CALENDER_YEAR, modelCalender.getYear());
 }
 intentType.putExtra(INTENT_CALENDER_TITLE, getString(R.string.string_activity_name_dob));
 intentType.putExtra(INTENT_CALENDER_MAX_YEAR, HelperTime.getInstance().getCurrentYear() - CONSTANT_FOR_DOB_UPTO);
startActivityForResult(intentType, INTENT_CALENDER_SINGLE_PICKER);


Single Date Picker
calender



Dependency (Only)


  • Android Appcompact and Support Fragment Library v27.1.1

Credits


Desgin & Developed by : Jatin Sahgal (Linkedin & Website) & Pickers)


More Library under Jamun


  • Pickers Pickers Library provide you a set of Pickers like Country, Language, Share and Intent Chooser.
  • Country-Pickers allow you to access Country picking functionality with great UI/UX design, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property. Library consists of updated collection of country name, code and there flags. We are using APIs base structure to avoid increase in the size of apk due to flag Images. This module Maintain the database so that you don't need to call APIs again and again rather than you can choose when to refresh the Database and fetch new real time data.
  • Language-Pickers provides you read-made Language picker which is easy to use and comes with great UI/UX, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property.
  • Share-Dialog-Pickers provide you Intent Chooser with great UI/UX. It automatically retrive the sort list of all the apps which can share the file. This functionality saves much of your task. You can also share dialog Picker for sending Large files. For this you just need to call a single function with file as Argument.
  • Scanner is a collection of Beautiful Activity which help others to make there own Custom QR/Barcode Scanner.
  • Volley Library is a set of Custom Classes with UI components for network programming, integration and transaction handling in a better and standard way. This will help developers for making quality use of volley library.
  • UI library is a set of UI Views, Custom Component and Collection of Helper Classes which help Developer for making quality Product. Such as Camera, Gallery, Number of Pickers, Calendar, Date Pickers, Dialogs and many more Heler UI and Backend Component.
  • Camera library provide you Custom Complete Camera view with full features like Flash, Rotation, Gallery Picker, Focus, Tap to capture, Confirmation window and last but not least croping feature. It also provide you file path in return so that developer can feel a friendly handy way to Deal After.
  • Gallery have some Beautiful UI Components and Multi files Mode for android Developers to give there app a A Rich look With single and Multi picker Functionality.

License


Copyright (c) 2018 Jatin Sahgal

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.

Jamun-Camera


Camera library provide you Custom Complete Camera view with full features like Flash, Rotation, Gallery Picker, Focus, Tap to capture, Confirmation window and last but not least croping feature. It also provide you file path in return so that developer can feel a friendly handy way to Deal After.

What's New? (0.0.1)


  • Stable Official Version for Developers and Live Apps.
  • Easy Calling Mechanism with Instant reply via onActivityResult.
  • Need less calls with many customs Tags in Intent Object to reach maximum developer satisfaction.
  • Compatible With Gallery Library for More Efficent Working;
  • App with continous face Detaction Feature.

Why this library?


  • This library Competible with all screen sizes and device (Tab with 7' inches and 10'inches).
  • Library support both orientation that is portrait and landscape.
  • Its Calling feature is very simple and easy to use.
  • You don't need to add Multiple libraries and UI components, It have such Components inside that make Quality.
  • Library is Customizable for Enable Gallery Mode or Only Camera Mode .
  • Library Automaticaly Handle Flash, Rotation and Focus mode Availablity that is Device Dependent.
  • Library Doesn't force App Camera Dependent Feature in Playstore Device Compatible Analogs.

Quality Measures? for (0.0.1)


The following apps are using this library without facing any kind of Bugs.



Jamun-Camera Preview


Window View Working Preview
jamun_camera jamun_camera

Gradle Configuration


Add the dependency
dependencies {
     compile 'tk.jamun.ui:camera:0.0.1'
}

Maven Config


<dependency>
  <groupId>tk.jamun.ui</groupId>
  <artifactId>camera</artifactId>
  <version>0.0.1</version>
  <type>aar</type>
</dependency>



How to Implement


Once the project has been added to gradle, You can use these lines of code to configure pickers....

Step 1. Define Intent Object


Simple Object declaration :
Intent intent = new Intent(this, ActivityCamera.class);

Step 2. Start Module By Calling


This method is very common to Android Developer, Very easy calling way to Start an activity help you same for calling this Picker :
startActivityForResult(intent, ACTION_REQUEST_CAMERA);

Step 3. Get Result from Picker


@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
 if (requestCode == ACTION_REQUEST_CAMERA) {
     if (resultCode == RESULT_OK) {
       file = new File(data.getStringExtra(RESULT_IMAGE_PATH));
    }
  }
}

Dependency

  • Android Appcompact Library v27.1.1
  • Google Vision 15.0.2

Credits


Desgin & Developed by : Jatin Sahgal (Linkedin & Website & Github)

More Library under Jamun

  • Pickers Pickers Library provide you a set of Pickers like Country, Language, Share and Intent Chooser.
  • Country-Pickers allow you to access Country picking functionality with great UI/UX design, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property. Library consists of updated collection of country name, code and there flags. We are using APIs base structure to avoid increase in the size of apk due to flag Images. This module Maintain the database so that you don't need to call APIs again and again rather than you can choose when to refresh the Database and fetch new real time data.
  • Language-Pickers provides you read-made Language picker which is easy to use and comes with great UI/UX, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property.
  • Calendar is a collection of Beautiful Activities which help others to make there Fully Custom Calendar View with Single and Multi Date Picker Functionality
  • Scanner is a collection of Beautiful Activity which help others to make there own Custom QR/Barcode Scanner.
  • Volley Library is a set of Custom Classes with UI components for network programming, integration and transaction handling in a better and standard way. This will help developers for making quality use of volley library.
  • UI library is a set of UI Views, Custom Component and Collection of Helper Classes which help Developer for making quality Product. Such as Camera, Gallery, Number of Pickers, Calendar, Date Pickers, Dialogs and many more Heler UI and Backend Component.
  • Gallery have some Beautiful UI Components and Multi files Mode for android Developers to give there app a A Rich look With single and Multi picker Functionality.

License

Copyright (c) 2018 Jatin Sahgal

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.


Jamun-Volley


A set of Custom Classes with UI components for network programming, integration and transaction handling in a better and standard way. This will help developers for making quality use of volley library.

Introduction

  • In this Library Jamun-Volley, we provide you a package of custom Volley Classes which ease your work while working with API calls.
  • You just need to setup all the configuration stuff (Like Header Meta-Data, Singleton Declarations this will be shown with example later in the documnet) at one place so that you don't have to write same piece of code again and again. For example, MyApplication Class.
  • Jamun-Volley library has been developed keeping many parameters in mind by default the library support many auto-configuration like LUR-Cache, Request and ImageLoader Objects. But in case if you need To Edit Something We have also provided you to edit Definations and setting up new configuration parameters.
  • One of the main benifit of using Jamun-Volley LIbrary is that you can Post Any type of data and Retrive response in another format which wasn't possible in traditional Volley Library.
  • THis Library also provide you File Downloading and Uploading classes which were upsent in Traditional Volley. With the help of this Library you can also manage of your file Downloading/Uploading progress easliy with Data Statistics.
  • Library's most attractives UI Feature is that you are provided with CircularNetworkImageView with the help of which you can display your image in Attractive Circullar View. By Just using CircularNetworkImageView.
  • Library also provide you a UI Component to Show progress Data Statistics in Notification. But this also provide you a set of Function which help in Customization.

What's New? (0.0.1)

  • Stable Official Version for Developers and Live Apps.
  • Custom UI components for Progress Notifications with Infinite and Counted progress bar. Also have data analytics.
  • Easy Calling Mechanism with Instant reply via Listeners and Return Functions
  • Lite version for minimal code calls with maximum Auto APIs Calling features
  • Need less calls with many customs methods to reach maximum developer satisfaction.

Quality Measures? for (0.0.1)


The following apps are using this library without facing any kind of Bugs.



Gradle Configuration


Add the dependency
dependencies {
        compile 'tk.jamun:volley:0.0.1'
}

Maven Config


<dependency>
  <groupId>tk.jamun</groupId>
  <artifactId>volley</artifactId>
  <version>0.0.1</version>
  <type>aar</type>
</dependency>



Features and Functionalities


As you all familiar with Basic calls Required in Accessing JSON Data of Type,
  • JSONObject Request
  • JSONArray Request
  • String Request
But this Library Provide you :
  • Network Response Request
  • Response Request with Response in String and Network
Uploading
  • Multipart Request for Payload
  • HTTPConnection Request for Payload with Notifcaion
Downloading
  • File Download Request for Payload
  • Image Download Request for Image
  • HTTPConnection Request for Payload with Notifcaion
Also for used in Background Services like Services, IntentServices, AsynTasks
Background Service Tasks
  • For Payload with Notifcaion
  • For JSONObject
  • For JSONArray
  • For String
Last but not Lease : Error Response
  • With Status Code
  • With Predefined Status Replies



How to Implement


Once the project has been added to gradle, You can use these lines of code to configure pickers...

Step 1. Volley Setup


Library provide you a Better Approach and Efficent way to setup Google Volley Library, now you don't need to create Volely singleton or create a Setup of LRU Cache for File buffering or caching or many more things developer need to set first to start volley. And last but not least, no need of creating header again and again for each APIs calls, this will done automatically with one function call define in Application class for Global Access.
But here, these things are automate by calling some methods in Application class
 @Override
 public void onCreate() {
        super.onCreate();
        VolleySingleton.setInstance(mInstance);
        setAndRefreshVolleyHeaderCredentials();
 }
 // this function call required to setup or refresh your 
// Header AuTH details from one place for whole further api calls.
 public void setAndRefreshVolleyHeaderCredentials() {
        VolleyNeeds.getInstance()
.setUpHeaders(ClassSharedPreference.getInstance().getHeaderCredentials());
 }
 
 //If you want to setup LRU cache Size
 VolleySingleton.setLruCacheSize(int lruCacher);

Method define in Sharepreference class for accessing AUth header Details. Example after login or registeration, setup your auth Fundamental in SharedPrefrence and push refresh to set for Global Use
public ArrayList<ModelHeader> getHeaderCredentials() {
    ArrayList<ModelHeader> headerArrayList = new ArrayList<>();
    headerArrayList.add(new ModelHeader(KEY_USER_ID, 
sharedPreferences.getString(KEY_USER_ID, null)));
    headerArrayList.add(new ModelHeader(KEY_TOKEN, 
sharedPreferences.getString(KEY_TOKEN, null)));
    headerArrayList.add(new ModelHeader(TAG,DATA));
    headerArrayList.add(new ModelHeader(TAG,DATA));
    headerArrayList.add(new ModelHeader(TAG,DATA));
    return headerArrayList;
}
Thats it. Your all setup is now Done in Two lines.

Step 1. APIs integration with Jamun-Volley


As you all familiar with Basic calls Required in Accessing JSON Data, as you seen it have similar calling structure for Developer to feel familiar but with full advance automation,
  • No need of Extra header calls
  • No Need of Priority setup
  • No Need of Retry Policy Calls
  • JSONObject Request
VolleyJsonObjectRequest jsonObjectRequest =
 new VolleyJsonObjectRequest(Request.Method.POST, url,
               @Nullable body, new VolleyResponse.Listener<JSONObject>() {
            @Override
            public void onResponse(JSONObject response) {
            }
        }, new VolleyResponse.ErrorListener() {
            @Override
            public void onErrorResponse(int statusCode, String errorMessage)
 { MySnackBar.showSnackBarForMessage(activity, statusCode, errorMessage);
            }
        });
        VolleyNeeds.getInstance().setVolleyExtraCalls(jsonObjectRequest);  
        
// for Get Request
VolleyJsonObjectRequest jsonObjectRequest = new VolleyJsonObjectRequest(url,
             new VolleyResponse.Listener<JSONObject>() {....

  • JSONArray Request
VolleyJsonArrayRequest jsonArrayRequest =
new VolleyJsonArrayRequest(Request.Method.POST, url,
               @Nullable body, new VolleyResponse.Listener<JSONArray>() {
            @Override
            public void onResponse(JSONArray response) {
            }
        }, new VolleyResponse.ErrorListener() {
            @Override
            public void onErrorResponse(int statusCode, String errorMessage)
 {  MySnackBar.showSnackBarForMessage(activity, statusCode, errorMessage);
        });
        VolleyNeeds.getInstance().setVolleyExtraCalls(jsonArrayRequest);    

// for Get Request
VolleyJsonArrayRequest jsonArrayRequest = new VolleyJsonArrayRequest(url,
             new VolleyResponse.Listener<JSONArray>() {....

  • String Request
VolleyStringRequest volleyStringRequest =
 new VolleyStringRequest(Request.Method.POST, url,
               @Nullable body, new VolleyResponse.Listener<JSONArray>() {
            @Override
            public void onResponse(JSONArray response) {
            }
        }, new VolleyResponse.ErrorListener() {
            @Override
            public void onErrorResponse(int statusCode, String errorMessage) {
                MySnackBar.showSnackBarForMessage(activity, 
statusCode, errorMessage);
            }
        });
        VolleyNeeds.getInstance().setVolleyExtraCalls(volleyStringRequest);    
  • Network Response Request
 VolleyNetworkRequest volleyNetworkRequest = 
new VolleyNetworkRequest(Request.Method.POST, URL,
                @Nullable body, new VolleyResponse.Listener<Integer>() {
            @Override
            public void onResponse(Integer response) {
                if (VolleyNeeds.getInstance().checkResponseCode(response)) {
                    // for response between 200 to 300
                } else {
                    MySnackBar.showSnackBarForMessage(
ActivityProfileChange.this, R.string.connection_something_went_wrong);
                }
            }
        }, new VolleyResponse.ErrorListener() {
            @Override
            public void onErrorResponse(int statusCode, String errorMessage)
 {
            }
        });
        VolleyNeeds.getInstance().setVolleyExtraCalls(volleyNetworkRequest);
  • Response Request
VolleyResponseRequests volleyStringRequest = new VolleyResponseRequests(
Request.Method.POST, url,
               @Nullable body, new VolleyResponse.Listener<String>() {
            @Override
            public void onResponse(String response) {
            }
        },new VolleyResponse.Listener<Integer>() {
            @Override
            public void onResponse(Integer response) {
                if (VolleyNeeds.getInstance().checkResponseCode(response)) {
                    // for response between 200 to 300
                } else {
                    MySnackBar.showSnackBarForMessage(
ActivityProfileChange.this, R.string.connection_something_went_wrong);
                }
            }
        }, new VolleyResponse.ErrorListener() {
            @Override
            public void onErrorResponse(int statusCode, String errorMessage)
 {
                MySnackBar.showSnackBarForMessage(activity, statusCode,
 errorMessage);
            }
        });
        VolleyNeeds.getInstance().setVolleyExtraCalls(volleyStringRequest);    
  • Multipart File Uploading Request
// Setup calls for setting file for Uploadind
Map<String, ModelByPart> params = new HashMap<>();

// params.put(TAG,new ModelByPart(FileName,fileDataFromBitmap,"image/"+ext.));
params.put(API_TAG, new ModelByPart(file.getName(),
    VolleyHelper.getFileDataFromBitmap(BitmapFactory
.decodeFile(mCurrentPhotoPath.getAbsolutePath())),
  "image/" + file.getName().substring(file.getName().lastIndexOf(".") + 1)
.toLowerCase()));
                        
VolleyMultipartRequest multipartRequest = new VolleyMultipartRequest(URL,
 params,     new VolleyResponse.Listener<String>() {
         @Override
         public void onResponse(String response) {
                    
    }, new VolleyResponse.ErrorListener() {
            @Override
            public void onErrorResponse(int statusCode, String errorMessage)
{
                utilityClass.closeProgressDialog();
                MySnackBar.showSnackBarForMessage(ActivityProfileChange.this,
 statusCode, errorMessage);
            }
        });
VolleyNeeds.getInstance().setVolleyExtraCalls(multipartRequest);
   
  • Last Call to setup Request for Execution is By
        VolleyNeeds.getInstance().setVolleyExtraCalls(jsonObjectRequestSetAvatar);    
  • Volley in Background Service
Jamun Volley Background Services provide you a better and efficent approach to Upload or Download data payloads in background tasks. It will help developers to maintain session during payload uploading and downloading. This will return result after complete execution, so no need to maintain another threads for waiting response.
There are different types to use Jamun-Volley in Background Tasks :-
  1. Get Request
String response = VolleyBackgroundServices.getInstance()
.volleyToGetData(URL, new VolleyResponse.ErrorListener() {
            @Override
            public void onErrorResponse(int statusCode, String errorMessage)
 {
                //Error Response
            }
        });
  1. Post Request
String response = VolleyBackgroundServices.getInstance()
.volleyToSendData(URL, payload,new VolleyResponse.ErrorListener() {
            @Override
            public void onErrorResponse(int statusCode, String errorMessage)
 {
                //Error Response
            }
        });
  1. Get Post Request
//integer Methods are Request.Method.POST,Request.Method.GET,
Request.Method.DELETE,Request.Method.UPDATE
String response = VolleyBackgroundServices.getInstance()
.volleyToGetPostData(Method,URL, payload,new VolleyResponse.ErrorListener()
 {
            @Override
            public void onErrorResponse(int statusCode, String errorMessage)
 {
                //Error Response
            }
        });
  1. Upload File
//Methods are Request.Method.POST,Request.Method.GET,Request.Method.DELETE,
Request.Method.UPDATE
// Tag name used for uploading file with API tag
String response = VolleyBackgroundServices.getInstance()
.volleyToSendFile(File, Method, URL, tagName,
new VolleyResponse.ErrorListener(){
            @Override
            public void onErrorResponse(int statusCode, String errorMessage)
 {
                //Error Response
            }
        });
  1. Close In-Between
Using this method, help you stoping APIs call in between;
VolleyBackgroundServices.getInstance().stopServices();
  • HTTPConnection Request for Payload with Notifcaion
  1. Uploading File
    /**
     * Method helps you uploading heavy files with HttpURLConnection request.
     * Method required AsyncTasks or Service to handle uploading;
     * Otherwise thrown NetworkOnMainThreadException
     * @param url Request URL for Upload payload
     * @param sourceFile Source file need to be Upload
     * @param helperNotification HelperNotification class for Notified user 
     * by Progress Notification
     * @param notificationId Unique id for Progress Notification
     * @return APIs response
     */
String response = VolleyDownUpFiles.getInstance().uploadFile(URL, SourceFile,
 HelperNotification, notificationId);
  1. Downloading File
    /**
     * Method helps you downloading heavy files with HttpURLConnection request. 
     * Method required AsyncTasks or Service to handle uploading;
     * Otherwise thrown NetworkOnMainThreadException
     * @param requestUrl Request URL for Upload payload
     * @param filePath Download file need to be Saved
     * @param helperNotification HelperNotification class for Notified user by
     * Progress Notification
     * @param notificationId Unique id for Progress Notification
     * @return APIs response
     */
String response = VolleyDownUpFiles.getInstance().downloadFile(URL, filePath,
 HelperNotification, notificationId);
  1. Stop Service
VolleyDownUpFiles.getInstance().stop();

  1. Customize Buffer Size
Different file have differnt size in Uploading, this required volley to create a buffer to maintain file in Uploading Tasks; Need to be set according to mean of the Files Size to stop MemoryBufferSizeException;
VolleyDownUpFiles.getInstance().stop();

Dependency

  • Android Volley v1.1.0
  • Java jar org.apache.http.legacy.jar

Credits


Desgin & Developed by : Jatin Sahgal (Linkedin & Website) & Pickers)

Live Project using this Library


The following apps are using this library without facing any kind of Bugs.

More Library under Jamun

  • Pickers Pickers Library provide you a set of Pickers like Country, Language, Share and Intent Chooser.

  • Country-Pickers allow you to access Country picking functionality with great UI/UX design, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property. Library consists of updated collection of country name, code and there flags. We are using APIs base structure to avoid increase in the size of apk due to flag Images. This module Maintain the database so that you don't need to call APIs again and again rather than you can choose when to refresh the Database and fetch new real time data.

  • Language-Pickers provides you read-made Language picker which is easy to use and comes with great UI/UX, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property.

  • Scanner is a collection of Beautiful Activity which help others to make there own Custom QR/Barcode Scanner.

  • Calendar is a collection of Beautiful Activities which help others to make there Fully Custom Calendar View with Single and Multi Date Picker Functionality

  • UI library is a set of UI Views, Custom Component and Collection of Helper Classes which help Developer for making quality Product. Such as Camera, Gallery, Number of Pickers, Calendar, Date Pickers, Dialogs and many more Heler UI and Backend Component.

  • Camera library provide you Custom Complete Camera view with full features like Flash, Rotation, Gallery Picker, Focus, Tap to capture, Confirmation window and last but not least croping feature. It also provide you file path in return so that developer can feel a friendly handy way to Deal After.

  • Gallery have some Beautiful UI Components and Multi files Mode for android Developers to give there app a A Rich look With single and Multi picker Functionality.

  • Elements Library provide you a custom set of Android Elements that have custom views and properties like CircularImageView and CircularNetworkImageView.

License

Copyright (c) 2018 Jatin Sahgal

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.

Saturday, June 9, 2018

Jamun-Pickers



Pickers Library provide you a set of different Pickers like Country, Language, Share and Intent Chooser.
  1. Country Pickers allow you to access Country picking functionality with great UI/UX design, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property. Library consists of updated collection of country name, code and there flags. We are using APIs base structure to avoid increase in the size of apk due to flag Images. This module Maintain the database so that you don't need to call APIs again and again rather than you can choose when to refresh the Database and fetch new real time data.
  2. Language Picker provides you read-made Language picker which is easy to use and comes with great UI/UX, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property.
  3. Intent Picker helps you to use Custom Intent Chooser with great UI/UX, and there are many of the feature for the customization of already embedded features. So that you can use it easily and gracefully.
  4. Share Dialog Picker provide you Intent Chooser with great UI/UX. It automatically retrive the sort list of all the apps which can share the file. This functionality saves much of your task. You can also share dialog Picker for sending Large files. For this you just need to call a single function with file as Argument.

What's New? (0.0.1)

  • Stable official Version for Rapid Development.
  • Custom UI components with Single and Multi Selection Mode in Country and Language Pickers.
  • Easy Calling mechanism with instant reply via Listeners
  • Optimized code with Api integration for Country Picker for Flags Images
  • Country and Language Pickers have four modes you can optout from these Four mode (i.e. Bottom Sheet, Dialog, Activity, Navigation View)
  • All the views in the library are Screen compatible i.e. You can execute this library on different android screens including tabs.

Quality Measures? for (0.0.1)


The following apps are using this library without facing any kind of Bugs.

Why this Library?

  • This library Pickers competible with all screen sizes and device (Tab with 7' inches and 10'inches).
  • Library support both orientation that is portrait and landscape.
  • Its simple and easy to use.
  • Its Customizable (Support Custom Themes).
  • Minimum API is 15, but it'll probably work in API 9 and above, just make sure you test it out (we use Support Fragment Manager).

All-in-One Setup


The easiest way to add Pickers library to your project is by adding it as a dependency to your build.gradle. To add picker library you just need to append few lines into your build.gradle. These lines are provided in Integration Part given Below

Gradle Configuration


Add the dependency

Step 1. Add the jCenter repository to your build file. Add it in your root build.gradle at the end of repositories:
allprojects {
  repositories {
        mavenCentral()
  }
}

Step 2. Add the dependency
dependencies {
        compile 'tk.jamun.ui:pickers:0.0.1'
}

Maven Configuration


<dependency>
  <groupId>tk.jamun.ui</groupId>
  <artifactId>pickers</artifactId>
  <version>0.0.1</version>
  <type>aar</type>
</dependency>



Types of Pickers


Utility Pickers


It consist of Intent and Share dialog Picker. Both Modules are enough smart to Provide you enough feature to customize them as much as you want.

1. Intent Picker helps you to use Custom Intent Chooser with great UI/UX, and there are many of the feature for the customization of already embedded features. So that you can use it easily and gracefully.
2. Share Dialog Picker provide you Intent Chooser with great UI/UX. It automatically retrive the sort list of all the apps which can share the file. This functionality saves much of your task. You can also share dialog Picker for sending Large files. For this you just need to call a single function with file as Argument.

Gradle Setup


Step 1. Add the jCenter repository to your build file. Add it in your root build.gradle at the end of repositories:
allprojects {
  repositories {
        mavenCentral()
  }
}

Step 2. Add the dependency
dependencies {
        compile 'tk.jamun.ui:share:0.0.1'
}

Maven


<dependency>
  <groupId>tk.jamun.ui</groupId>
  <artifactId>share</artifactId>
  <version>0.0.1</version>
  <type>aar</type>
</dependency>

Portrait Mode Layout




Intent Picker Share Picker
jamun_pickers_intent jamun_pickers_share

Landscape Mode Layout

Intent Picker Share Picker
jamun_pickers_intent_landscape jamun_pickers_share_landscape

Country-Pickers

Country Pickers allow you to access Country picking functionality with great UI/UX design, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property. Library consists of updated collection of country name, code and there flags.

Gradle Setup


Step 1. Add the jCenter repository to your build file. Add it in your root build.gradle at the end of repositories:
allprojects {
  repositories {
        mavenCentral()
  }
}
Step 2. Add the dependency
dependencies {
        compile 'tk.jamun.ui:country:0.0.1'
}

Maven

<dependency>
  <groupId>tk.jamun.ui</groupId>
  <artifactId>country</artifactId>
  <version>0.0.1</version>
  <type>aar</type>
</dependency>

Portrait Mode Layout



Bottom Sheet View Navigation View
jamun_pickers_country_bottom jamun_pickers_country_nav

Activity View Dialog View
jamun_pickers_country_activity jamun_pickers_country_dialog

Language-Pickers


Language Picker provides you read-made Language picker which is easy to use and comes with great UI/UX, and there are numberous of function which help you to modify picker as per your requirements. Library has been provided with four custom UI initate mode you can decide how the view of picker can be initate. You can also decide weather picker inheriate Single or Multi Selection property. You can allow edit the list of country name and language easily.

Gradle Setup


Step 1. Add the jCenter repository to your build file. Add it in your root build.gradle at the end of repositories:
allprojects {
  repositories {
        mavenCentral()
  }
}

Step 2. Add the dependency
dependencies {
        compile 'tk.jamun.ui:language:0.0.1'
}

Maven

<dependency>
  <groupId>tk.jamun.ui</groupId>
  <artifactId>language</artifactId>
  <version>0.0.1</version>
  <type>aar</type>
</dependency>



Portrait Mode Layout
Bottom Sheet View Navigation View
jamun_pickers_language_bottom jamun_pickers_language_navigation


Activity View Dialog View
jamun_pickers_language_activity jamun_pickers_language_dialog

Landscape Mode

Country-Picker Language Picker
jamun_pickers_country_landscape jamun_pickers_language_landscape

Multi Selection Mode

Country-Picker Language Picker
jamun_pickers_country_multi_selection jamun_pickers_language_multi_selection

How to Implement?


Once the project has been added to gradle, You can use these lines of code to configure pickers....

1. Share Picker


1. Define Class Object
PickerShareFiles pickerShareFiles = new PickerShareFiles();
pickerShareFiles.setThings(activity);




2. Call on Click

pickerShareFiles.shareThings(getSupportFragmentManager(), "Description", "Title");


2. Intent Picker


1. Define Class Object
ArrayList<ModelIntentPicker> arrayList = new ArrayList<>();
arrayList.add(new ModelIntentPicker(PickerIntent.PICKER_CAMERA, 
getString(R.string.string_button_name_camera), R.drawable.library_icon_vd_clear,
R.drawable.library_background_intent_two, ACTION_REQUEST_CAMERA));
arrayList.add(new ModelIntentPicker(PickerIntent.PICKER_REMOVE, 
getString(R.string.string_button_name_remove), R.drawable.library_icon_vd_clear,
 R.drawable.library_background_intent_five, 0));
PickerIntent intentPicker = new PickerIntent();
intentPicker.setThings(activity).setPicker("Title of the Intent Picker", arrayList);

2. Call on Click
intentPicker.showPicker(getSupportFragmentManager());




3. onBackPressed or Destroy

intentPicker.clear();


3. Country-Picker


1. Bottom Sheet View


This implement your picker as an Bottom Sheet view.




1. Define Class Object
PickerCountryBottom pickerCountryBottom = new PickerCountryBottom()
           .setThings(this).bindListener(new PickerListenerCountry() {
                    @Override
            public void singleModeData(ModelCountry modelCountry) {
                super.singleModeData(modelCountry);
                       //Return single selection mode data as an model
            }
            @Override
            public void multiModeData(ArrayList<ModelCountry> countryArrayList){
                super.multiModeData(countryArrayList);
                //Return Multi selection mode data as an arraylist.
                    }
                    @Override
                    public void apiError(int statusCode, String errorMessage) {
                    }
                });
        pickerCountryBottom.setSelectionModeMulti(false);

2. Call on Click
pickerCountryBottom.showPicker(getSupportFragmentManager());

3. onBackPressed or Destroy
pickerCountryBottom.clear();

2. Navigation View


This implement your picker as an Navigation Drawer view.

1. Define Class Object with Toolbar and DrawerLayout Object
PickerCountryNavigation navLeftFragment = (PickerCountryNavigation)
        getSupportFragmentManager().findFragmentById(R.id.id_navigation);
        navLeftFragment.setSelectionModeMulti(false);
        navLeftFragment.setTags(initializeDataCountryTags());
        navLeftFragment.setUpDrawer(drawerLayout, toolbar, false, new PickerListenerCountry() {
            @Override
            public void singleModeData(ModelCountry modelCountry) {
                super.singleModeData(modelCountry);
                       //Return single selection mode data as an model
            }
            @Override
            public void multiModeData(ArrayList<ModelCountry> countryArrayList){
                super.multiModeData(countryArrayList);
                //Return Multi selection mode data as an arraylist.
            }
            @Override
            public void apiError(int statusCode, String errorMessage) {
            }
        }, GravityCompat.END);

2. XML layout Code
<android.support.v4.widget.DrawerLayout>
 <fragment
        android:id="@+id/id_navigation"
        android:name="tk.jamun.pickers.views.country.PickerCountryNavigation"
        android:layout_width="@dimen/dimen_nav_width"
        android:layout_height="match_parent"
        android:layout_gravity="end"
        app:layout="@layout/library_country_bottom"
        tools:layout="@layout/library_country_bottom" />
</android.support.v4.widget.DrawerLayout>

3. onBackPressed or Destroy
if (drawerLayout.isDrawerOpen(GravityCompat.END)) {
            drawerLayout.closeDrawer(GravityCompat.END);
}else{
 super.onBackPressed();
}


3. Dialog View


This implement your picker as an Dialog view.

1. Define Class Object
PickerCountryDialog  pickerCountryDialog = new PickerCountryDialog(this).bindListener(new PickerListenerCountry() {
            @Override
            public void singleModeData(ModelCountry modelCountry) {
                super.singleModeData(modelCountry);
                       //Return single selection mode data as an model
            }
            @Override
            public void multiModeData(ArrayList<ModelCountry> countryArrayList){
                super.multiModeData(countryArrayList);
                //Return Multi selection mode data as an arraylist.
            }
            @Override
            public void apiError(int statusCode, String errorMessage) {

            }
        }).setSelectionModeMulti(false).setTags(initializeDataCountryTags())
.createSetUp();

2. Call on Click
 pickerCountryDialog.show();

3. onBackPressed or Destroy
pickerCountryDialog.clear();

4. Activity View


This implement your picker as an Activity view.

1. Start Activity
PickerCountryActivity.setThings(this, new PickerListenerCountry() {
            @Override
            public void singleModeData(ModelCountry modelCountry) {
                super.singleModeData(modelCountry);
                       //Return single selection mode data as an model
            }
            @Override
            public void multiModeData(ArrayList<ModelCountry> countryArrayList){
                super.multiModeData(countryArrayList);
                //Return Multi selection mode data as an arraylist.
            }
            @Override
            public void apiError(int statusCode, String errorMessage) {
            }
        }, initializeDataCountryTags(), false);

5. Additional Options


1. Customize Api tags and Urls

You can also customize APIs urls and tags as per your need for Country Picker. We are using APIs base structure to avoid increase in the size of apk due to flag Images..
private ModelCountryDetails initializeDataCountryTags() {
        ModelCountryDetails modelCountryDetails = new ModelCountryDetails();
        modelCountryDetails.setTagCountry("country");
        modelCountryDetails.setTagISO("iso");
        modelCountryDetails.setTagCountryCode("countrycode");
        modelCountryDetails.setTagFlag("flag");
        modelCountryDetails.setUrlImageDownload("imageUrl");
        modelCountryDetails.setUrlGetCountry("url");
        return modelCountryDetails;
    }

2. Refresh Database

You can use this function refreshDatabase(). i.e. that you can call api again to fetch real time data into your app. This module Maintain the database so that you don't need to call APIs again and again 
rather than you can choose when to refresh the Database and fetch new real time data.
object.refreshDatabase();
You can retrive all the data assosiated to Object if you now any of the parameter Name,Code and ISO.

3. Find Data Model with Country Name
object.findByName(countryName);

4. Find Data Model with Country Code
object.findByCode((int)countryCode);

5. Find Data Model with ISO
object.findByCode(iso);

6. Start Multi Selection (Dialog/Bottom/Navigation)
This function call provide you an opportunity to make your picker Multi or Single Selector.
object..setSelectionModeMulti(true);

3. Language-Picker


1. Bottom Sheet View


This implement your picker as an Bottom Sheet view.



1. Define Class Object
PickerLanguageBottom  pickerLanguageBottom = new PickerLanguageBottom().setThings(this, initializeData())
                .bindListener(new PickerListenerLanguage() {
                    @Override
                    public void singleModeData(ModelLanguage modelLanguage) {
                        super.singleModeData(modelLanguage);
                       //Return single selection mode data as an model
            }
            @Override
            public void multiModeData(ArrayList<ModelLanguage> languageArrayList){
                super.multiModeData(languageArrayList);
                //Return Multi selection mode data as an arraylist.
                    }
                });
        pickerLanguageBottom.setSelectionModeMulti(false);

2. Call on Click
pickerLanguageBottom.showPicker(getSupportFragmentManager());

3. onBackPressed or Destroy
pickerLanguageBottom.clear();

2. Navigation View


This implement your picker as an Navigation Drawer View.

1. Define Class Object with Toolbar and DrawerLayout Object
PickerLanguageNavigation navLeftFragment = (PickerLanguageNavigation)
        getSupportFragmentManager().findFragmentById(R.id.id_navigation_language);
        navLeftFragment.setSelectionModeMulti(false);
        navLeftFragment.setUpDrawer(drawerLayout, toolbar, false, new PickerListenerLanguage() {
            @Override
            public void singleModeData(ModelLanguage modelLanguage) {
                super.singleModeData(modelLanguage);
                       //Return single selection mode data as an model
            }
            @Override
            public void multiModeData(ArrayList<ModelLanguage> languageArrayList){
                super.multiModeData(languageArrayList);
                //Return Multi selection mode data as an arraylist.
            }
        }, LANG_MODE_NORMAL, GravityCompat.START);

2. XML layout Code
<android.support.v4.widget.DrawerLayout>
  <fragment
        android:id="@+id/id_navigation_language"
        android:name="tk.jamun.pickers.views.language.PickerLanguageNavigation"
        android:layout_width="@dimen/dimen_nav_width"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        app:layout="@layout/library_language"
        tools:layout="@layout/library_language" />
</android.support.v4.widget.DrawerLayout>

3. onBackPressed or Destroy
if (drawerLayout.isDrawerOpen(GravityCompat.END)) {
   drawerLayout.closeDrawer(GravityCompat.END);
}else{
   super.onBackPressed();
}

3. Dialog View


This implement your picker as an Dialog.

1. Define Class Object
PickerLanguageDialog pickerLanguageDialog = new PickerLanguageDialog(this).setData(initializeData()).
                bindListener(new PickerListenerLanguage() {
                    @Override
                    public void singleModeData(ModelLanguage modelLanguage) {
                        super.singleModeData(modelLanguage);
                       //Return single selection mode data as an model
            }
            @Override
            public void multiModeData(ArrayList<ModelLanguage> languageArrayList  {
                super.multiModeData(languageArrayList);
                //Return Multi selection mode data as an arraylist.
                    }
                }).setSelectionModeMulti(false).createSetUp();

2. Call onClick
pickerLanguageDialog.show();

3. onBackPressed or Destroy
pickerLanguageDialog.clear();

4. Activity View


This implement your picker as an Activity.

Start Activity
PickerLanguageActivity.setThings(this, new PickerListenerLanguage() {
            @Override
            public void singleModeData(ModelLanguage modelLanguage) {
                super.singleModeData(modelLanguage);
                //Return single selection mode data as an model
            }
            @Override
            public void multiModeData(ArrayList<ModelLanguage> languageArrayList){
                super.multiModeData(languageArrayList);
                //Return Multi selection mode data as an arraylist.
            }
        }, initializeData(), LANG_MODE_NORMAL, false);

5. Additional Options


1. Customize Data

You can send data in the form of array list to customize data of Language Picker. The sample given below display a Perfect example how to add more data into language picker.


public ArrayList<ModelLanguageParent> initializeData() {
        ArrayList<ModelLanguageParent> arrayList = new ArrayList<>();
        ArrayList<ModelLanguage> arrayListChild = new ArrayList<>();
        arrayListChild.add(new ModelLanguage(LANG_ENGLISH, "English","English"));
        arrayListChild.add(new ModelLanguage(LANG_HINDI, "Hindi", "हिंदी"));
        arrayListChild.add(new ModelLanguage(LANG_ARABIC, "Arabic", "عربى"));
        arrayList.add(new ModelLanguageParent(arrayListChild, "Select Language"));
        arrayListChild = new ArrayList<>();
        arrayListChild.add(new ModelLanguage(LANG_PUNJABI, "Punjabi", "ਪੰਜਾਬੀ"));
        arrayListChild.add(new ModelLanguage(LANG_BENGALI, "Bengali", "বাঙালি"));
        arrayListChild.add(new ModelLanguage(LANG_TELGU, "Telugu", "తెలుగు"));
        arrayListChild.add(new ModelLanguage(LANG_MARATHI, "Marathi", "मराठी"));
        arrayListChild.add(new ModelLanguage(LANG_TAMIL, "Tamil", "தமிழ்"));
        arrayListChild.add(new ModelLanguage(LANG_URDU, "Urdu", "اردو"));
        arrayListChild.add(new ModelLanguage(LANG_GUJRATI, "Gujarati", "ગુજરાતી"));
        arrayListChild.add(new ModelLanguage(LANG_KANNADA, "Kannada", "ಕನ್ನಡ"));
        arrayListChild.add(new ModelLanguage(LANG_ODIA, "Odia", "ଓରିୟା"));
        arrayListChild.add(new ModelLanguage(LANG_MALAYALAM, "Malayalam", "മലയാളം"));
        arrayListChild.add(new ModelLanguage(LANG_ASSAMESE, "Assamese", "অসমীয়া"));
        arrayListChild.add(new ModelLanguage(LANG_MAITHALI, "Maithili", "মৈথিলী"));
        arrayList.add(new ModelLanguageParent(arrayListChild, "Indian"));
        return arrayList;
    }

2. Start Multi Selection (Dialog/Bottom/Navigation)

This function call provide you an opportunity to make your picker Multi or Single Selector.


object..setSelectionModeMulti(true);


To understand more how the library works, please take a look at the sample app.



Dependency

  • Android Support Fragment Library v27.1.1
  • Jamun Volley Library Volley

Credits


Desgin & Developed by : Jatin Sahgal (Linkedin & Website) & Pickers)


More Library under Jamun

  • Volley Library is a set of Custom Classes with UI components for network programming, integration and transaction handling in a better and standard way. This will help developers for making quality use of volley library.
  • Scanner is a collection of Beautiful Activity which help others to make there own Custom QR/Barcode Scanner.
  • Calendar is a collection of Beautiful Activities which help others to make there Fully Custom Calendar View with Single and Multi Date Picker Functionality
  • Camera library provide you Custom Complete Camera view with full features like Flash, Rotation, Gallery Picker, Focus, Tap to capture, Confirmation window and last but not least croping feature. It also provide you file path in return so that developer can feel a friendly handy way to Deal After.
  • Gallery have some Beautiful UI Components and Multi files Mode for android Developers to give there app a A Rich look With single and Multi picker Functionality.
  • UI library is a set of UI Views, Custom Component and Collection of Helper Classes which help Developer for making quality Product. Such as Camera, Gallery, Number of Pickers, Calendar, Date Pickers, Dialogs and many more Heler UI and Backend Component.
  • Elements Library provide you a custom set of Android Elements that have custom views and properties like CircularImageView and CircularNetworkImageView.

License

Copyright (c) 2018 Jatin Sahgal

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.