arsalrao / RackMonthPicker

android library dialog month picker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RackMonthPicker

android library dialog month picker

Screenshots

Download

Download via Maven:

Add the JitPack repository to your build file

<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add the dependency

<dependency>
	    <groupId>com.github.lutvie72</groupId>
	    <artifactId>rackmonthpicker</artifactId>
	    <version>1.2</version>
</dependency>

via Gradle:

Add it in your root build.gradle at the end of repositories

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

Add the dependency

dependencies {
	        compile 'com.github.lutvie72:RackMonthPicker:1.2'
	}

How to use :

 new RackMonthPicker(this)
 	 .setLocale(Locale.ENGLISH)
         .setPositiveButton(new DateMonthDialogListener() {
               @Override
               public void onDateMonth(int month, int startDate, int endDate, int year, String monthLabel) {

               }
          })
          .setNegativeButton(new OnCancelMonthDialogListener() {
                @Override
                public void onCancel(AlertDialog dialog) {

                }
          }).show();

adding .setPositiveText(String text) or .setNegativeText(String Text) to change the text of a button. adding .setLocale(Locale.ENGLISH) to change language.

Once the dialog is shown, you can dismiss it:

RackMonthPicker rackMonthPicker = new RackMonthPicker(this)
            .......
            .show();

rackMonthPicker.dismiss();

About

android library dialog month picker

License:GNU General Public License v3.0


Languages

Language:Java 100.0%