ashqal / 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.kal72</groupId>
        <artifactId>RackMonthPicker</artifactId>
        <version>1.6.0</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 {
        implementation 'com.github.kal72:RackMonthPicker:1.6.0'
}

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.
adding .setColorTheme(R.color.primary) to change color theme.
adding .setSelectedMonth(4) to change default month selected. adding .setMonthType(MonthType) to show month by text or number.

Once the dialog is shown, you can dismiss it:

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

rackMonthPicker.dismiss();

Contributing

Contributions are welcome!

About

android library dialog month picker

License:Apache License 2.0


Languages

Language:Java 100.0%