### MonthAndYearPicker Usage Example Source: https://github.com/premkumarroyal/monthandyearpicker/blob/master/README.md Demonstrates how to initialize and configure the MonthPickerDialog with various options like setting activated month/year, min/max years, month ranges, and custom listeners. ```java MonthPickerDialog.Builder builder = new MonthPickerDialog.Builder(MainActivity.this, new MonthPickerDialog.OnDateSetListener() { @Override public void onDateSet(int selectedMonth, int selectedYear) { // on date set } }, today.get(Calendar.YEAR), today.get(Calendar.MONTH)); builder.setActivatedMonth(Calendar.JULY) .setMinYear(1990) .setActivatedYear(2017) .setMaxYear(2030) .setMinMonth(Calendar.FEBRUARY) .setTitle("Select trading month") .setMonthRange(Calendar.FEBRUARY, Calendar.NOVEMBER) // .setMaxMonth(Calendar.OCTOBER) // .setYearRange(1890, 1890) // .setMonthAndYearRange(Calendar.FEBRUARY, Calendar.OCTOBER, 1890, 1890) //.showMonthOnly() // .showYearOnly() .setOnMonthChangedListener(new MonthPickerDialog.OnMonthChangedListener() { @Override public void onMonthChanged(int selectedMonth) { // on month selected } }) .setOnYearChangedListener(new MonthPickerDialog.OnYearChangedListener() { @Override public void onYearChanged(int selectedYear) { // on year selected } }) .build() .show(); ``` -------------------------------- ### MonthAndYearPicker API Documentation Source: https://github.com/premkumarroyal/monthandyearpicker/blob/master/README.md Provides a comprehensive list of methods available for configuring the MonthPickerDialog, including setting month/year ranges, activation dates, visibility options, and listeners. ```APIDOC MonthPickerDialog.Builder: setActivatedMonth(int activatedMonth) Sets the initially selected month when the picker opens. setMinMonth(int minMonth) Sets the minimum month that the user can select. setMaxMonth(int maxMonth) Sets the maximum month that the user can select. setMonthRange(int minMonth, int maxMonth) Sets both the minimum and maximum selectable months. setActivatedYear(int activatedYear) Sets the initially selected year when the picker opens. setMinYear(int minYear) Sets the minimum year that will be shown in the picker. setMaxYear(int maxYear) Sets the maximum year that will be shown in the picker. setYearRange(int minYear, int maxYear) Sets both the minimum and maximum selectable years. setMonthAndYearRange(int minMonth, int maxMonth, int minYear, int maxYear) Sets the minimum and maximum values for both months and years simultaneously. showMonthOnly() Configures the picker to only show month selection. showYearOnly() Configures the picker to only show year selection. setTitle(String title) Sets the title for the Month Picker Dialog. The title is hidden by default and becomes visible when a value is set. setOnMonthChangedListener(MonthPickerDialog.OnMonthChangedListener onMonthChange) Sets a listener to be notified when the month selection changes. setOnYearChangedListener(MonthPickerDialog.OnYearChangedListener onYearChange) Sets a listener to be notified when the year selection changes. ``` -------------------------------- ### MonthAndYearPicker Maven Dependency Source: https://github.com/premkumarroyal/monthandyearpicker/blob/master/README.md Instructions for adding the MonthAndYearPicker library to your Android project using Maven. ```maven com.whiteelephant monthandyearpicker 1.3.0 pom ``` -------------------------------- ### MonthAndYearPicker Gradle Dependency Source: https://github.com/premkumarroyal/monthandyearpicker/blob/master/README.md Instructions for adding the MonthAndYearPicker library to your Android project using Gradle. ```gradle compile 'com.whiteelephant:monthandyearpicker:1.3.0' ``` -------------------------------- ### MonthAndYearPicker Styling Source: https://github.com/premkumarroyal/monthandyearpicker/blob/master/README.md Illustrates how to customize the appearance of the MonthAndYearPicker by overriding its theme in your application's styles.xml. This allows control over background colors, font colors, and header colors. ```xml ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.