[
  {
    "path": ".gitignore",
    "content": "\n*.iml\n.gradle\n/local.properties\n/bintray.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n\n.classpath\n.project\n.settings\neclipsebin\n\n/A_Improvments.txt\n\nbin\ngen\nbuild\nout\nlib\n\n.idea\n*.iml\nclasses\n\nobj\n\n.DS_Store\n\n# Gradle\n.gradle\njniLibs\nbuild\nreports\n\n\n# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\n\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\nbintray.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Android Studio Navigation editor temp files\n.navigation/\n\n# Android Studio captures folder\ncaptures/\n\n# Intellij\n*.iml\n.idea/workspace.xml\n\n# Keystore files\n*.jks\nimprovments\nA_Improvments.java\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Prem Kumar Koti\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# MonthAndYearPicker\n\nMonth and Year Picker allow user to pick only month and year or only month or only year as required. You will get notified for all action's such as on selection of date, on selection of month and on section of year.\n\n\n\n## Sample Project output:\n\n![MonthAndYearPicker](https://github.com/premkumarroyal/MonthAndYearPicker/blob/master/sample/src/main/res/raw/datepicker.gif?raw=true \"Month and Year Picker\") ![MonthAndYearPicker](https://j.gifs.com/nZpE4P.gif?raw=true \"Choose Month\") ![MonthAndYearPicker](https://github.com/premkumarroyal/MonthAndYearPicker/blob/master/sample/src/main/res/raw/choose_year.gif?raw=true \"Choose Year\") ![MonthAndYearPicker](https://j.gifs.com/LgoKEv.gif?raw=true \"Choose Quantity\")\n\n\n# Code\n\n     MonthPickerDialog.Builder builder = new MonthPickerDialog.Builder(MainActivity.this, \n     new MonthPickerDialog.OnDateSetListener() {\n       @Override\n       public void onDateSet(int selectedMonth, int selectedYear) { // on date set }\n     }, today.get(Calendar.YEAR), today.get(Calendar.MONTH));\n    \n    builder.setActivatedMonth(Calendar.JULY)\n           .setMinYear(1990)\n           .setActivatedYear(2017)\n           .setMaxYear(2030)\n           .setMinMonth(Calendar.FEBRUARY)\n           .setTitle(\"Select trading month\")\n           .setMonthRange(Calendar.FEBRUARY, Calendar.NOVEMBER)\n           // .setMaxMonth(Calendar.OCTOBER)\n           // .setYearRange(1890, 1890)\n           // .setMonthAndYearRange(Calendar.FEBRUARY, Calendar.OCTOBER, 1890, 1890)\n           //.showMonthOnly()\n           // .showYearOnly()\n           .setOnMonthChangedListener(new MonthPickerDialog.OnMonthChangedListener() {\n             @Override\n             public void onMonthChanged(int selectedMonth) { // on month selected } })\n           .setOnYearChangedListener(new MonthPickerDialog.OnYearChangedListener() {\n              @Override\n              public void onYearChanged(int selectedYear) { // on year selected } })\n            .build()\n            .show();\n                        \n## Listeners\n    setOnMonthChangedListener(OnMonthChangedListener());\n    setOnYearChangedListener(OnYearChangedListener());\n\n## Methods\n Methods | Docs\n------------ | -------------\nsetMaxMonth(int maxMonth) |  Maximum month that user can select.\nsetMinMonth(int minMonth) |  Minimum month that user can select.\nsetMonthRange(int minMonth, int maxMonth) | set both max and min sections.\nsetActivatedMonth(activatedMonth) | selected the month when picker opens.\nsetMaxYear(int maxYear) | Maximum year that will be shown in picker.\nsetMinYear(int minYear) | Minimum year that will be shown in picker.\nsetYearRange(int minYear, int maxYear) | set both max and min selections.\nsetActivatedYear(activatedYear) | selected the year when picker opens.\nsetMonthAndYearRange(int minMonth, int maxMonth, int minYear, int maxYear) | set month and year min and max values at once.\nshowMonthOnly() | Only month selection will be shown.\nshowYearOnly() | Only year selection will be shown.\nsetTitle(String title) | set the title for Month Picker Dialog. By default title will be hidden, it will be visible if value set.\nsetOnMonthChangedListener(MonthPickerDialog.OnMonthChangedListener onMonthChange); | Listener for select month\nsetOnYearChangedListener(MonthPickerDialog.OnYearChangedListener onYearChange); | Listener for year select year\n\n\n## Styling\n\nMonth and Year picker by default pick the color from theme if you declared colorAccent. If you want to change color's you can override the theme as below.\n\n     <style name=\"MonthPickerDialogStyle\" >\n        <item name=\"monthBgColor\">@color/bgColor</item>\n        <item name=\"monthBgSelectedColor\">@color/colorAccent</item>\n        <item name=\"monthFontColorSelected\">@color/selectionColor</item>\n        <item name=\"monthFontColorNormal\">@color/bgColor</item>\n        <item name=\"monthFontColorDisabled\">@color/bgColor</item>\n\n        <item name=\"headerBgColor\">@color/colorAccent</item>\n        <item name=\"headerFontColorSelected\">#fff</item>\n        <item name=\"headerFontColorNormal\">#85FFFFFF</item>\n        <item name=\"headerTitleColor\">#fff</item>\n\n        <item name=\"dialogActionButtonColor\">@color/colorAccent</item>\n    </style>\n\n\n## Usage \n\nAdd Gradle Dependency in your build.gradle file\n\n    compile 'com.whiteelephant:monthandyearpicker:1.3.0'\n\nor Maven\n\n    <dependency>\n      <groupId>com.whiteelephant</groupId>\n      <artifactId>monthandyearpicker</artifactId>\n      <version>1.3.0</version>\n      <type>pom</type>   \n    </dependency>\n   \n\n\n\n\n"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\r\n\r\nbuildscript {\r\n    repositories {\r\n        jcenter()\r\n        google()\r\n    }\r\n    dependencies {\r\n        classpath 'com.android.tools.build:gradle:3.1.3'\r\n\r\n        // NOTE: Do not place your application dependencies here; they belong\r\n        // in the individual module build.gradle files\r\n\r\n        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.2'\r\n        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'\r\n    }\r\n}\r\n\r\nallprojects {\r\n    repositories {\r\n        jcenter()\r\n        google()\r\n    }\r\n}\r\n\r\ntask clean(type: Delete) {\r\n    delete rootProject.buildDir\r\n}\r\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed May 30 19:50:57 IST 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.4-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\r\n\r\n# IDE (e.g. Android Studio) users:\r\n# Gradle settings configured through the IDE *will override*\r\n# any settings specified in this file.\r\n\r\n# For more details on how to configure your build environment visit\r\n# http://www.gradle.org/docs/current/userguide/build_environment.html\r\n\r\n# Specifies the JVM arguments used for the daemon process.\r\n# The setting is particularly useful for tweaking memory settings.\r\n# Default value: -Xmx10248m -XX:MaxPermSize=256m\r\n# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\r\n\r\n# When configured, Gradle will run in incubating parallel mode.\r\n# This option should only be used with decoupled projects. More details, visit\r\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\r\n# org.gradle.parallel=true"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windowz variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\ngoto execute\r\n\r\n:4NT_args\r\n@rem Get arguments from the 4NT Shell from JP Software\r\nset CMD_LINE_ARGS=%$\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "monthandyearpicker/.gitignore",
    "content": "/build\r\n"
  },
  {
    "path": "monthandyearpicker/build.gradle",
    "content": "apply plugin: 'com.android.library'\r\napply plugin: 'com.github.dcendents.android-maven'\r\napply plugin: 'com.jfrog.bintray'\r\n\r\nversion = \"1.3.0\"\r\n\r\nandroid {\r\n    compileSdkVersion 27\r\n    buildToolsVersion '27.0.3'\r\n\r\n    defaultConfig {\r\n        minSdkVersion 14\r\n        targetSdkVersion 27\r\n        versionCode 1\r\n        versionName \"1.3.0\"\r\n    }\r\n    buildTypes {\r\n        release {\r\n            minifyEnabled false\r\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r\n        }\r\n    }\r\n}\r\n\r\next {\r\n    def v_bintrayRepo = ''\r\n    def v_bintrayName = ''\r\n    def v_publishedGroupId = ''\r\n    def v_libraryName = ''\r\n    def v_artifact = ''\r\n    def v_libraryDescription = ''\r\n    def v_gitUrl = ''\r\n    def v_libraryVersion = ''\r\n    def v_developerId = ''\r\n    def v_developerName = ''\r\n    def v_developerEmail = ''\r\n\r\n    def versionPropsFile = file('bintray.properties')\r\n    def Properties versionProps = new Properties()\r\n\r\n    if (versionPropsFile.canRead()) {\r\n        versionProps.load(new FileInputStream(versionPropsFile))\r\n\r\n        v_bintrayRepo = versionProps['bintrayRepo'].toString()\r\n        v_bintrayName = versionProps['bintrayName'].toString()\r\n        v_publishedGroupId = versionProps['publishedGroupId'].toString()\r\n        v_libraryName = versionProps['libraryName'].toString()\r\n        v_artifact = versionProps['artifact'].toString()\r\n        v_libraryDescription = versionProps['libraryDescription'].toString()\r\n        v_gitUrl = versionProps['gitUrl'].toString()\r\n        v_libraryVersion = versionProps['libraryVersion'].toString()\r\n        v_developerId = versionProps['developerId'].toString()\r\n        v_developerName = versionProps['developerName'].toString()\r\n        v_developerEmail = versionProps['developerEmail'].toString()\r\n\r\n    } else {\r\n        throw new FileNotFoundException(\"Could not read bintray.properties!\")\r\n    }\r\n\r\n    bintrayRepo = \"${v_bintrayRepo}\"\r\n    bintrayName = \"${v_bintrayName}\"\r\n\r\n\r\n    publishedGroupId = \"${v_publishedGroupId}\"\r\n    libraryName = \"${v_libraryName}\"\r\n    artifact = \"${v_artifact}\"\r\n\r\n    libraryDescription = \"${v_libraryDescription}\"\r\n\r\n    siteUrl = ''\r\n    gitUrl = \"${v_gitUrl}\"\r\n\r\n    libraryVersion = \"${v_libraryVersion}\"\r\n\r\n    developerId = \"${v_developerId}\"\r\n    developerName = \"${v_developerName}\"\r\n    developerEmail = \"${v_developerEmail}\"\r\n\r\n    licenseName = 'The Apache Software License, Version 2.0'\r\n    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'\r\n    allLicenses = [\"Apache-2.0\"]\r\n}\r\n\r\ndependencies {\r\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\r\n    testImplementation 'junit:junit:4.12'\r\n    implementation 'com.android.support:appcompat-v7:27.0.1'\r\n    implementation 'com.android.support:design:27.0.1'\r\n}\r\n\r\n\r\napply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'\r\napply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'"
  },
  {
    "path": "monthandyearpicker/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\r\n# By default, the flags in this file are appended to flags specified\r\n# in C:\\Users\\Prem\\AppData\\Local\\Android\\Sdk/tools/proguard/proguard-android.txt\r\n# You can edit the include path and order by changing the proguardFiles\r\n# directive in build.gradle.\r\n#\r\n# For more details, see\r\n#   http://developer.android.com/guide/developing/tools/proguard.html\r\n\r\n# Add any project specific keep options here:\r\n\r\n# If your project uses WebView with JS, uncomment the following\r\n# and specify the fully qualified class name to the JavaScript interface\r\n# class:\r\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\r\n#   public *;\r\n#}\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    package=\"com.example.prem.firstpitch\">\r\n\r\n    <application\r\n        android:allowBackup=\"true\"\r\n        android:icon=\"@mipmap/ic_launcher\"\r\n        android:label=\"@string/app_name\"\r\n        android:supportsRtl=\"true\"/>\r\n\r\n</manifest>"
  },
  {
    "path": "monthandyearpicker/src/main/java/com/whiteelephant/monthpicker/MonthPickerDialog.java",
    "content": "package com.whiteelephant.monthpicker;\r\n\r\nimport android.content.Context;\r\nimport android.content.DialogInterface;\r\nimport android.content.DialogInterface.OnClickListener;\r\nimport android.content.res.Configuration;\r\nimport android.support.annotation.IntRange;\r\nimport android.support.v7.app.AlertDialog;\r\nimport android.util.Log;\r\nimport android.view.LayoutInflater;\r\nimport android.view.View;\r\nimport android.view.WindowManager;\r\nimport android.widget.DatePicker;\r\nimport android.widget.DatePicker.OnDateChangedListener;\r\n\r\nimport com.example.prem.firstpitch.R;\r\n\r\nimport java.util.Calendar;\r\n\r\n\r\npublic class MonthPickerDialog extends AlertDialog implements OnClickListener, OnDateChangedListener {\r\n    private final MonthPickerView _monthPicker;\r\n    private final OnDateSetListener _callBack;\r\n    private View view;\r\n\r\n    /**\r\n     * @param context     The context the dialog is to run in.\r\n     * @param callBack    How the parent is notified that the date is set.\r\n     * @param year        The initial year of the dialog.\r\n     * @param monthOfYear The initial month of the dialog.\r\n     */\r\n    private MonthPickerDialog(Context context,\r\n                              OnDateSetListener callBack,\r\n                              int year,\r\n                              int monthOfYear) {\r\n        this(context, 0, callBack, year, monthOfYear);\r\n    }\r\n\r\n\r\n    @Override\r\n    public void show() {\r\n\r\n        if (view != null) {\r\n            if (this.getContext().getResources().getConfiguration().orientation ==\r\n                    Configuration.ORIENTATION_LANDSCAPE) {\r\n                WindowManager.LayoutParams lp = new WindowManager.LayoutParams();\r\n                if (getWindow() != null) {\r\n                    lp.copyFrom(getWindow().getAttributes());\r\n                    lp.width = (int) (this.getContext().getResources().getDisplayMetrics().widthPixels * 0.94);\r\n                    lp.height = (int) (this.getContext().getResources().getDisplayMetrics().heightPixels * 0.94);\r\n                    // show the dialog as per super implementation\r\n                    super.show();\r\n                    // now dialog attached to window so apply the size\r\n                    getWindow().setLayout(lp.width, lp.height);\r\n                }\r\n\r\n                return;\r\n            }else {\r\n                dismiss();\r\n            }\r\n        }\r\n        super.show();\r\n    }\r\n\r\n    /**\r\n     * @param context     The context the dialog is to run in.\r\n     * @param theme       the theme to apply to this dialog\r\n     * @param callBack    How the parent is notified that the date is set.\r\n     * @param year        The initial year of the dialog.\r\n     * @param monthOfYear The initial month of the dialog.\r\n     */\r\n    private MonthPickerDialog(Context context,\r\n                              int theme,\r\n                              OnDateSetListener callBack,\r\n                              int year,\r\n                              int monthOfYear) {\r\n        super(context, theme);\r\n        _callBack = callBack;\r\n        LayoutInflater inflater = (LayoutInflater) context\r\n                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n        view = inflater.inflate(R.layout.month_picker_dialog, null);\r\n\r\n        setView(view);\r\n        _monthPicker = (MonthPickerView) view.findViewById(R.id.monthPicker);\r\n        _monthPicker.setOnDateListener(new MonthPickerView.OnDateSet() {\r\n            @Override\r\n            public void onDateSet() {\r\n                tryNotifyDateSet();\r\n                MonthPickerDialog.this.dismiss();\r\n            }\r\n        });\r\n        _monthPicker.setOnCancelListener(new MonthPickerView.OnCancel() {\r\n            @Override\r\n            public void onCancel() {\r\n                MonthPickerDialog.this.dismiss();\r\n            }\r\n        });\r\n\r\n        // to show dialog bigger view in landscape mode we are increasing the\r\n        // height and width of the dialog. If we do that android don't dismiss the dialog after\r\n        // rotation and try to render landscape UI in portrait mode which is not correct.\r\n        // so dismissing the dialog on each time when orientation changes.\r\n        _monthPicker.setOnConfigurationChanged(new OnConfigChangeListener() {\r\n            @Override\r\n            public void onConfigChange() {\r\n                dismiss();\r\n            }\r\n        });\r\n        _monthPicker.init(year, monthOfYear);\r\n    }\r\n\r\n    @Override\r\n    public void onClick(DialogInterface dialog, int which) {\r\n        tryNotifyDateSet();\r\n    }\r\n\r\n    @Override\r\n    public void onDateChanged(DatePicker view, int year, int month, int day) {\r\n        _monthPicker.init(year, month);\r\n    }\r\n\r\n    /**\r\n     * Gets the {@link DatePicker} contained in this dialog.\r\n     *\r\n     * @return The calendar view.\r\n     */\r\n    public MonthPickerView getDatePicker() {\r\n        return _monthPicker;\r\n    }\r\n\r\n\r\n    void tryNotifyDateSet() {\r\n        if (_callBack != null) {\r\n            _monthPicker.clearFocus();\r\n            _callBack.onDateSet(_monthPicker.getMonth(), _monthPicker.getYear());\r\n        }\r\n    }\r\n\r\n    @Override\r\n    protected void onStop() {\r\n        super.onStop();\r\n    }\r\n\r\n\r\n    private void setMinMonth(int minMonth) {\r\n        _monthPicker.setMinMonth(minMonth);\r\n    }\r\n\r\n    private void setMaxMonth(int maxMonth) {\r\n        _monthPicker.setMaxMonth(maxMonth);\r\n    }\r\n\r\n    private void setMinYear(int minYear) {\r\n        _monthPicker.setMinYear(minYear);\r\n    }\r\n\r\n    private void setMaxYear(int maxYear) {\r\n        _monthPicker.setMaxYear(maxYear);\r\n    }\r\n\r\n\r\n    private void setActivatedMonth(int activatedMonth) {\r\n        _monthPicker.setActivatedMonth(activatedMonth);\r\n    }\r\n\r\n    private void setActivatedYear(int activatedMonth) {\r\n        _monthPicker.setActivatedYear(activatedMonth);\r\n    }\r\n\r\n    private void setMonthPickerTitle(String title) {\r\n        _monthPicker.setTitle(title);\r\n    }\r\n\r\n    private void showMonthOnly() {\r\n        _monthPicker.showMonthOnly();\r\n    }\r\n\r\n    private void showYearOnly() {\r\n        _monthPicker.showYearOnly();\r\n    }\r\n\r\n    private void setOnMonthChangedListener(OnMonthChangedListener onMonthChangedListener) {\r\n        if (onMonthChangedListener != null) {\r\n            _monthPicker.setOnMonthChangedListener(onMonthChangedListener);\r\n        }\r\n    }\r\n\r\n    private void setOnYearChangedListener(OnYearChangedListener onYearChangedListener) {\r\n        if (onYearChangedListener != null) {\r\n            _monthPicker.setOnYearChangedListener(onYearChangedListener);\r\n        }\r\n    }\r\n\r\n    public static class Builder {\r\n\r\n        private static final String TAG = MonthPickerDialog.Builder.class.getName();\r\n        private Context _context;\r\n        private OnDateSetListener _callBack;\r\n        private int _activatedMonth, _activatedYear;\r\n        private int _minMonth = Calendar.JANUARY, _maxMonth = Calendar.DECEMBER;\r\n        private int _minYear, _maxYear;\r\n        private boolean monthOnly, yearOnly;\r\n        private String title = null;\r\n        private MonthPickerDialog monthPickerDialog;\r\n        private OnYearChangedListener _onYearChanged;\r\n        private OnMonthChangedListener _onMonthChanged;\r\n\r\n\r\n        /**\r\n         * Build a Dialog with month and year with given context.\r\n         *\r\n         * @param context  Context: the parent context\r\n         * @param callBack MonthPickerDialog.OnDateSetListener: the listener to call\r\n         *                 when the user sets the date\r\n         * @param year     the initially selected year\r\n         * @param month    the initially selected month (0-11 for compatibility with\r\n         *                 {@link Calendar}Calender.MONTH or Calendar.JANUARY, Calendar.FEBRUARY etc)\r\n         */\r\n\r\n        public Builder(Context context,\r\n                       OnDateSetListener callBack,\r\n                       int year,\r\n                       @IntRange(from = Calendar.JANUARY, to = Calendar.DECEMBER) int month) {\r\n\r\n            if (month >= Calendar.JANUARY && month <= Calendar.DECEMBER) {\r\n                this._activatedMonth = month;\r\n            } else {\r\n                throw new IllegalArgumentException(\"Month range should be between 0 \" +\r\n                        \"(Calender.JANUARY) to 11 (Calendar.DECEMBER)\");\r\n            }\r\n\r\n\r\n            if (year >= 1) {\r\n                this._activatedYear = year;\r\n            } else {\r\n                throw new IllegalArgumentException(\"Selected year should be > 1\");\r\n            }\r\n\r\n            this._context = context;\r\n            this._callBack = callBack;\r\n\r\n            if (year > MonthPickerView._minYear) {\r\n                _minYear = MonthPickerView._minYear;\r\n            } else {\r\n                _minYear = year;\r\n                MonthPickerView._minYear = year;\r\n            }\r\n\r\n            if (year > MonthPickerView._maxYear) {\r\n                _maxYear = year;\r\n                MonthPickerView._maxYear = year;\r\n            } else {\r\n                _maxYear = MonthPickerView._maxYear;\r\n            }\r\n\r\n\r\n        }\r\n\r\n        /**\r\n         * Minimum enable month in picker (0-11 for compatibility with Calender.MONTH or\r\n         * Calendar.JANUARY, Calendar.FEBRUARY etc).\r\n         *\r\n         * @param minMonth\r\n         * @return Builder\r\n         */\r\n        public Builder setMinMonth(@IntRange(from = Calendar.JANUARY, to = Calendar.DECEMBER)\r\n                                           int minMonth) {\r\n            if (minMonth >= Calendar.JANUARY && minMonth <= Calendar.DECEMBER) {\r\n                this._minMonth = minMonth;\r\n                return this;\r\n            } else {\r\n                throw new IllegalArgumentException(\"Month range should be between 0 \" +\r\n                        \"(Calender.JANUARY) to 11 (Calendar.DECEMBER)\");\r\n            }\r\n        }\r\n\r\n        /**\r\n         * Maximum enabled month in picker (0-11 for compatibility with Calender.MONTH or\r\n         * Calendar.JANUARY, Calendar.FEBRUARY etc).\r\n         *\r\n         * @param maxMonth\r\n         * @return\r\n         */\r\n        public Builder setMaxMonth(@IntRange(from = Calendar.JANUARY, to = Calendar.DECEMBER)\r\n                                           int maxMonth) {\r\n            /* if (maxMonth >= Calendar.JANUARY && maxMonth <= Calendar.DECEMBER) {*/\r\n            this._maxMonth = maxMonth;\r\n            return this;\r\n            /*} else {\r\n                throw new IllegalArgumentException(\"Month range should be between 0 \" +\r\n                        \"(Calender.JANUARY) to 11 (Calendar.DECEMBER)\");\r\n            }*/\r\n        }\r\n\r\n\r\n        /**\r\n         * Starting year in the picker.\r\n         *\r\n         * @param minYear\r\n         * @return Builder\r\n         */\r\n        public Builder setMinYear(int minYear) {\r\n            this._minYear = minYear;\r\n            return this;\r\n        }\r\n\r\n        /**\r\n         * Ending year in the picker.\r\n         *\r\n         * @param maxYear\r\n         * @return Builder\r\n         */\r\n        public Builder setMaxYear(int maxYear) {\r\n            this._maxYear = maxYear;\r\n            return this;\r\n        }\r\n\r\n        /**\r\n         * Initially selected month (0-11 for compatibility with Calender.MONTH or\r\n         * Calendar.JANUARY, Calendar.FEBRUARY etc).\r\n         *\r\n         * @param activatedMonth\r\n         * @return Builder\r\n         */\r\n        public Builder setActivatedMonth(@IntRange(from = Calendar.JANUARY, to = Calendar.DECEMBER)\r\n                                                 int activatedMonth) {\r\n            this._activatedMonth = activatedMonth;\r\n            return this;\r\n        }\r\n\r\n        /**\r\n         * Initially selected year (0-11 for compatibility with Calender.MONTH or\r\n         * Calendar.JANUARY, Calendar.FEBRUARY etc).\r\n         *\r\n         * @param activatedYear\r\n         * @return Builder\r\n         */\r\n        public Builder setActivatedYear(int activatedYear) {\r\n            this._activatedYear = activatedYear;\r\n            return this;\r\n        }\r\n\r\n\r\n        /**\r\n         * Minimum and Maximum enable month in picker (0-11 for compatibility with Calender.MONTH or\r\n         * Calendar.JANUARY, Calendar.FEBRUARY etc).\r\n         *\r\n         * @param minMonth minimum enabled month.\r\n         * @param maxMonth maximum enabled month.\r\n         * @return Builder\r\n         */\r\n        public Builder setMonthRange(@IntRange(from = Calendar.JANUARY, to = Calendar.DECEMBER)\r\n                                             int minMonth,\r\n                                     @IntRange(from = Calendar.JANUARY, to = Calendar.DECEMBER)\r\n                                             int maxMonth) {\r\n            if (minMonth >= Calendar.JANUARY && minMonth <= Calendar.DECEMBER &&\r\n                    maxMonth >= Calendar.JANUARY && maxMonth <= Calendar.DECEMBER) {\r\n                this._minMonth = minMonth;\r\n                this._maxMonth = maxMonth;\r\n                return this;\r\n            } else {\r\n                throw new IllegalArgumentException(\"Month range should be between 0 \" +\r\n                        \"(Calender.JANUARY) to 11 (Calendar.DECEMBER)\");\r\n            }\r\n        }\r\n\r\n        /**\r\n         * Starting and ending year show in picker\r\n         *\r\n         * @param minYear starting year\r\n         * @param maxYear ending year\r\n         * @return\r\n         */\r\n        public Builder setYearRange(int minYear, int maxYear) {\r\n            if (minYear <= maxYear) {\r\n                this._minYear = minYear;\r\n                this._maxYear = maxYear;\r\n                return this;\r\n            } else {\r\n                throw new IllegalArgumentException(\"Minimum year should be less then Maximum year\");\r\n            }\r\n\r\n        }\r\n\r\n        /**\r\n         * Set the Minimum, maximum enabled months and starting , ending years.\r\n         *\r\n         * @param minMonth minimum enabled month in picker\r\n         * @param maxMonth maximum enabled month in picker\r\n         * @param minYear  starting year\r\n         * @param maxYear  ending year\r\n         * @return\r\n         */\r\n        public Builder setMonthAndYearRange(@IntRange(from = Calendar.JANUARY, to = Calendar.DECEMBER)\r\n                                                    int minMonth,\r\n                                            @IntRange(from = Calendar.JANUARY, to = Calendar.DECEMBER)\r\n                                                    int maxMonth,\r\n                                            int minYear, int maxYear) {\r\n            if (minMonth >= Calendar.JANUARY && minMonth <= Calendar.DECEMBER &&\r\n                    maxMonth >= Calendar.JANUARY && maxMonth <= Calendar.DECEMBER) {\r\n                this._minMonth = minMonth;\r\n                this._maxMonth = maxMonth;\r\n\r\n            } else {\r\n                throw new IllegalArgumentException(\"Month range should be between 0 \" +\r\n                        \"(Calender.JANUARY) to 11 (Calendar.DECEMBER)\");\r\n            }\r\n\r\n            if (minYear <= maxYear) {\r\n                this._minYear = minYear;\r\n                this._maxYear = maxYear;\r\n            } else {\r\n                throw new IllegalArgumentException(\"Minimum year should be less then Maximum year\");\r\n            }\r\n            return this;\r\n        }\r\n\r\n        /**\r\n         * User can select month only. Year won't be shown to user once user select the month.\r\n         *\r\n         * @return Builder\r\n         */\r\n        public Builder showMonthOnly() {\r\n\r\n            if (yearOnly) {\r\n                Log.e(TAG, \"yearOnly also set to true before. Now setting yearOnly to false\" +\r\n                        \" monthOnly to true\");\r\n            }\r\n            this.yearOnly = false;\r\n            this.monthOnly = true;\r\n            return this;\r\n        }\r\n\r\n        /**\r\n         * User can select year only. Month won't be shown to user once user select the month.\r\n         *\r\n         * @return Builder\r\n         */\r\n        public Builder showYearOnly() {\r\n            if (monthOnly) {\r\n                Log.e(TAG, \"monthOnly also set to true before. Now setting monthOnly to \" +\r\n                        \"false and yearOnly to true\");\r\n            }\r\n            this.monthOnly = false;\r\n            this.yearOnly = true;\r\n            return this;\r\n        }\r\n\r\n        /**\r\n         * Set the title to the picker.\r\n         *\r\n         * @param title\r\n         * @return Builder\r\n         */\r\n        public Builder setTitle(String title) {\r\n            this.title = title;\r\n            return this;\r\n        }\r\n\r\n        /**\r\n         * Sets the callback that will be called when user click on any month.\r\n         *\r\n         * @param onMonthChangedListener\r\n         * @return Builder\r\n         */\r\n        public Builder setOnMonthChangedListener(OnMonthChangedListener onMonthChangedListener) {\r\n            this._onMonthChanged = onMonthChangedListener;\r\n            return this;\r\n        }\r\n\r\n        /**\r\n         * Sets the callback that will be called when the user select any year.\r\n         *\r\n         * @param onYearChangedListener\r\n         * @return Builder\r\n         */\r\n        public Builder setOnYearChangedListener(OnYearChangedListener onYearChangedListener) {\r\n            this._onYearChanged = onYearChangedListener;\r\n            return this;\r\n        }\r\n\r\n        public MonthPickerDialog build() {\r\n\r\n            if (_minMonth > _maxMonth) {\r\n                throw new IllegalArgumentException(\"Minimum month should always \" +\r\n                        \"smaller then maximum month.\");\r\n            }\r\n\r\n            if (_minYear > _maxYear) {\r\n                throw new IllegalArgumentException(\"Minimum year should always \" +\r\n                        \"smaller then maximum year.\");\r\n            }\r\n\r\n            if (_activatedMonth < _minMonth || _activatedMonth > _maxMonth) {\r\n                throw new IllegalArgumentException(\"Activated month should always \" +\r\n                        \"in between Minimum and maximum month.\");\r\n            }\r\n\r\n            if (_activatedYear < _minYear || _activatedYear > _maxYear) {\r\n                throw new IllegalArgumentException(\"Activated year should always \" +\r\n                        \"in between Minimum year and maximum year.\");\r\n            }\r\n\r\n\r\n            monthPickerDialog = new MonthPickerDialog(_context, _callBack, _activatedYear,\r\n                    _activatedMonth);\r\n            if (monthOnly) {\r\n                monthPickerDialog.showMonthOnly();\r\n                _minYear = 0;\r\n                _maxYear = 0;\r\n                _activatedYear = 0;\r\n            } else if (yearOnly) {\r\n                monthPickerDialog.showYearOnly();\r\n                _minMonth = 0;\r\n                _maxMonth = 0;\r\n                _activatedMonth = 0;\r\n            }\r\n            monthPickerDialog.setMinMonth(_minMonth);\r\n            monthPickerDialog.setMaxMonth(_maxMonth);\r\n            monthPickerDialog.setMinYear(_minYear);\r\n            monthPickerDialog.setMaxYear(_maxYear);\r\n            monthPickerDialog.setActivatedMonth(_activatedMonth);\r\n            monthPickerDialog.setActivatedYear(_activatedYear);\r\n\r\n            if (_onMonthChanged != null) {\r\n                monthPickerDialog.setOnMonthChangedListener(_onMonthChanged);\r\n            }\r\n\r\n            if (_onYearChanged != null) {\r\n                monthPickerDialog.setOnYearChangedListener(_onYearChanged);\r\n            }\r\n\r\n            if (title != null) {\r\n                monthPickerDialog.setMonthPickerTitle(title.trim());\r\n            }\r\n            return monthPickerDialog;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * The callback used to indicate the user is done selecting month.\r\n     */\r\n    public interface OnDateSetListener {\r\n        /**\r\n         * @param selectedMonth The month that was set (0-11) for compatibility with {@link Calendar}.\r\n         * @param selectedYear  The year that was set.\r\n         */\r\n        void onDateSet(int selectedMonth, int selectedYear);\r\n    }\r\n\r\n    /**\r\n     * The callback used to indicate the user click on month\r\n     */\r\n    public interface OnMonthChangedListener {\r\n        /**\r\n         * @param selectedMonth The month that was set (0-11) for compatibility\r\n         *                      with {@link Calendar}.\r\n         */\r\n        void onMonthChanged(int selectedMonth);\r\n    }\r\n\r\n    /**\r\n     * The callback used to indicate the user click on year.\r\n     */\r\n    public interface OnYearChangedListener {\r\n        /**\r\n         * Called upon a year change.\r\n         *\r\n         * @param year The year that was set.\r\n         */\r\n        void onYearChanged(int year);\r\n    }\r\n\r\n    public interface OnConfigChangeListener{\r\n\r\n        void onConfigChange();\r\n    }\r\n}\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/java/com/whiteelephant/monthpicker/MonthPickerView.java",
    "content": "package com.whiteelephant.monthpicker;\r\n\r\nimport android.content.Context;\r\nimport android.content.res.Configuration;\r\nimport android.content.res.TypedArray;\r\nimport android.os.Build;\r\nimport android.util.AttributeSet;\r\nimport android.util.Log;\r\nimport android.util.TypedValue;\r\nimport android.view.LayoutInflater;\r\nimport android.view.View;\r\nimport android.widget.FrameLayout;\r\nimport android.widget.LinearLayout;\r\nimport android.widget.ListView;\r\nimport android.widget.RelativeLayout;\r\nimport android.widget.TextView;\r\n\r\nimport com.example.prem.firstpitch.R;\r\n\r\nimport java.text.DateFormatSymbols;\r\nimport java.util.Calendar;\r\nimport java.util.HashMap;\r\nimport java.util.Locale;\r\n\r\nclass MonthPickerView extends FrameLayout {\r\n\r\n    YearPickerView _yearView;\r\n    ListView _monthList;\r\n    static int _minYear = 1900, _maxYear = Calendar.getInstance().get(Calendar.YEAR);\r\n    MonthViewAdapter _monthViewAdapter;\r\n    TextView _month, _year, _title;\r\n    Context _context;\r\n    int _headerFontColorSelected, _headerFontColorNormal;\r\n    boolean _showMonthOnly;\r\n    int _selectedMonth, _selectedYear;\r\n    MonthPickerDialog.OnYearChangedListener _onYearChanged;\r\n    MonthPickerDialog.OnMonthChangedListener _onMonthChanged;\r\n    OnDateSet _onDateSet;\r\n    OnCancel _onCancel;\r\n    private String[] _monthNames;\r\n\r\n    /*private static final int[] ATTRS_TEXT_COLOR = new int[] {\r\n            com.android.internal.R.attr.textColor};\r\n    private static final int[] ATTRS_DISABLED_ALPHA = new int[] {\r\n            com.android.internal.R.attr.disabledAlpha};*/\r\n\r\n    public MonthPickerView(Context context) {\r\n        this(context, null);\r\n        _context = context;\r\n    }\r\n\r\n    public MonthPickerView(Context context, AttributeSet attrs) {\r\n        this(context, attrs, 0);\r\n        _context = context;\r\n    }\r\n\r\n    public MonthPickerView(Context context, AttributeSet attrs, int defStyleAttr) {\r\n        super(context, attrs, defStyleAttr);\r\n        _context = context;\r\n        LayoutInflater mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n        mInflater.inflate(R.layout.month_picker_view, this);\r\n        _monthNames = new DateFormatSymbols(Locale.getDefault()).getShortMonths();\r\n\r\n        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.monthPickerDialog,\r\n                defStyleAttr, 0);\r\n\r\n        // getting default values based on the user's theme.\r\n\r\n        /*\r\n\r\n       if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\r\n                headerBgColor = android.R.attr.colorAccent;\r\n            } else {\r\n                //Get colorAccent defined for AppCompat\r\n                headerBgColor = context.getResources().getIdentifier(\"colorAccent\", \"attr\", context.getPackageName());\r\n            }\r\n            TypedValue outValue = new TypedValue();\r\n            context.getTheme().resolveAttribute(headerBgColor, outValue, true);\r\n            int color = outValue.data;\r\n\r\n        // OR\r\n        TypedValue typedValue = new TypedValue();\r\n\r\n        TypedArray a = mContext.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent, R.attr.colorPrimary });\r\n        int color = a.getColor(0, 0);\r\n\r\n        a.recycle();\r\n\r\n        // OR\r\n\r\n        final TypedValue value = new TypedValue ();\r\n        context.getTheme ().resolveAttribute (R.attr.colorAccent, value, true);\r\n        int color = value.data\r\n    */\r\n\r\n        int headerBgColor = a.getColor(R.styleable.monthPickerDialog_headerBgColor, 0);\r\n        _headerFontColorNormal = a.getColor(R.styleable.monthPickerDialog_headerFontColorNormal, 0);\r\n        _headerFontColorSelected = a.getColor(R.styleable.monthPickerDialog_headerFontColorSelected, 0);\r\n        int monthBgColor = a.getColor(R.styleable.monthPickerDialog_monthBgColor, 0);\r\n        int monthBgSelectedColor = a.getColor(R.styleable.monthPickerDialog_monthBgSelectedColor, 0);\r\n        int monthFontColorNormal = a.getColor(R.styleable.monthPickerDialog_monthFontColorNormal, 0);\r\n        int monthFontColorSelected = a.getColor(R.styleable.monthPickerDialog_monthFontColorSelected, 0);\r\n        int monthFontColorDisabled = a.getColor(R.styleable.monthPickerDialog_monthFontColorDisabled, 0);\r\n        int headerTitleColor = a.getColor(R.styleable.monthPickerDialog_headerTitleColor, 0);\r\n        int actionButtonColor = a.getColor(R.styleable.monthPickerDialog_dialogActionButtonColor, 0);\r\n\r\n         if (monthFontColorNormal == 0) {\r\n\r\n             monthFontColorNormal = getResources().getColor(R.color.fontBlackEnable);\r\n\r\n           /* if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\r\n                monthFontColorNormal = android.R.attr.textColor;\r\n            } else {\r\n                monthFontColorNormal = getResources().getIdentifier(\"textColor\", \"attr\", null);\r\n            }\r\n            TypedValue outValue = new TypedValue();\r\n            context.getTheme().resolveAttribute(monthFontColorNormal, outValue, true);\r\n            int color = outValue.data;\r\n            monthFontColorNormal = color;*/\r\n\r\n\r\n            /*monthFontColorNormal = context.getTheme().resolveAttribute(\r\n                    android.R.attr.textColorPrimary, outValue, true) ? outValue.data : getResources().getColor(R.color.fontBlackEnable);*/\r\n\r\n        }\r\n\r\n        if (monthFontColorSelected == 0) {\r\n            monthFontColorSelected = getResources().getColor(R.color.fontWhiteEnable);\r\n        }\r\n\r\n        if (monthFontColorDisabled == 0) {\r\n            monthFontColorDisabled = getResources().getColor(R.color.fontBlackDisable);\r\n\r\n        }\r\n        if (_headerFontColorNormal == 0) {\r\n            _headerFontColorNormal = getResources().getColor(R.color.fontWhiteDisable);\r\n        }\r\n        if (_headerFontColorSelected == 0) {\r\n            _headerFontColorSelected = getResources().getColor(R.color.fontWhiteEnable);\r\n        }\r\n        if (headerTitleColor == 0) {\r\n            headerTitleColor = getResources().getColor(R.color.fontWhiteEnable);\r\n        }\r\n        if (monthBgColor == 0) {\r\n            monthBgColor = getResources().getColor(R.color.fontWhiteEnable);\r\n        }\r\n\r\n        if (headerBgColor == 0) {\r\n\r\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\r\n                headerBgColor = android.R.attr.colorAccent;\r\n            } else {\r\n                //Get colorAccent defined for AppCompat\r\n                headerBgColor = context.getResources().getIdentifier(\"colorAccent\",\r\n                        \"attr\", context.getPackageName());\r\n            }\r\n            TypedValue outValue = new TypedValue();\r\n            context.getTheme().resolveAttribute(headerBgColor, outValue, true);\r\n            headerBgColor = outValue.data;\r\n        }\r\n\r\n        if (monthBgSelectedColor == 0) {\r\n\r\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\r\n                monthBgSelectedColor = android.R.attr.colorAccent;\r\n            } else {\r\n                //Get colorAccent defined for AppCompat\r\n                monthBgSelectedColor = context.getResources().getIdentifier(\"colorAccent\",\r\n                        \"attr\", context.getPackageName());\r\n            }\r\n            TypedValue outValue = new TypedValue();\r\n            context.getTheme().resolveAttribute(monthBgSelectedColor, outValue, true);\r\n            monthBgSelectedColor = outValue.data;\r\n        }\r\n\r\n        HashMap<String, Integer> map = new HashMap();\r\n        if (monthBgColor != 0)\r\n            map.put(\"monthBgColor\", monthBgColor);\r\n        if (monthBgSelectedColor != 0)\r\n            map.put(\"monthBgSelectedColor\", monthBgSelectedColor);\r\n        if (monthFontColorNormal != 0)\r\n            map.put(\"monthFontColorNormal\", monthFontColorNormal);\r\n        if (monthFontColorSelected != 0)\r\n            map.put(\"monthFontColorSelected\", monthFontColorSelected);\r\n        if (monthFontColorDisabled != 0)\r\n            map.put(\"monthFontColorDisabled\", monthFontColorDisabled);\r\n\r\n        a.recycle();\r\n\r\n        _monthList = (ListView) findViewById(R.id.listview);\r\n        _yearView = (YearPickerView) findViewById(R.id.yearView);\r\n        _month = (TextView) findViewById(R.id.month);\r\n        _year = (TextView) findViewById(R.id.year);\r\n        _title = (TextView) findViewById(R.id.title);\r\n        RelativeLayout _pickerBg = (RelativeLayout) findViewById(R.id.picker_view);\r\n        LinearLayout _header = (LinearLayout) findViewById(R.id.header);\r\n        RelativeLayout _actionBtnLay = (RelativeLayout) findViewById(R.id.action_btn_lay);\r\n        TextView ok = (TextView) findViewById(R.id.ok_action);\r\n        TextView cancel = (TextView) findViewById(R.id.cancel_action);\r\n\r\n\r\n        if (actionButtonColor != 0) {\r\n            ok.setTextColor(actionButtonColor);\r\n            cancel.setTextColor(actionButtonColor);\r\n        } else {\r\n            ok.setTextColor(headerBgColor);\r\n            cancel.setTextColor(headerBgColor);\r\n        }\r\n\r\n        if (_headerFontColorSelected != 0)\r\n            _month.setTextColor(_headerFontColorSelected);\r\n        if (_headerFontColorNormal != 0)\r\n            _year.setTextColor(_headerFontColorNormal);\r\n        if (headerTitleColor != 0)\r\n            _title.setTextColor(headerTitleColor);\r\n        if (headerBgColor != 0)\r\n            _header.setBackgroundColor(headerBgColor);\r\n        if (monthBgColor != 0)\r\n            _pickerBg.setBackgroundColor(monthBgColor);\r\n        if(monthBgColor != 0)\r\n            _actionBtnLay.setBackgroundColor(monthBgColor);\r\n\r\n        ok.setOnClickListener(new OnClickListener() {\r\n            @Override\r\n            public void onClick(View view) {\r\n                _onDateSet.onDateSet();\r\n            }\r\n        });\r\n        cancel.setOnClickListener(new OnClickListener() {\r\n            @Override\r\n            public void onClick(View view) {\r\n                _onCancel.onCancel();\r\n            }\r\n        });\r\n        _monthViewAdapter = new MonthViewAdapter(context);\r\n        _monthViewAdapter.setColors(map);\r\n        _monthViewAdapter.setOnDaySelectedListener(new MonthViewAdapter.OnDaySelectedListener() {\r\n            @Override\r\n            public void onDaySelected(MonthViewAdapter view, int selectedMonth) {\r\n                Log.d(\"----------------\", \"MonthPickerDialogStyle selected month = \" + selectedMonth);\r\n                MonthPickerView.this._selectedMonth = selectedMonth;\r\n                _month.setText(_monthNames[selectedMonth]);\r\n                if (!_showMonthOnly) {\r\n                    _monthList.setVisibility(View.GONE);\r\n                    _yearView.setVisibility(View.VISIBLE);\r\n                    _month.setTextColor(_headerFontColorNormal);\r\n                    _year.setTextColor(_headerFontColorSelected);\r\n                }\r\n                if (_onMonthChanged != null) {\r\n                    _onMonthChanged.onMonthChanged(selectedMonth);\r\n                }\r\n            }\r\n        });\r\n        _monthList.setAdapter(_monthViewAdapter);\r\n\r\n        _yearView.setRange(_minYear, _maxYear);\r\n        _yearView.setColors(map);\r\n        _yearView.setYear(Calendar.getInstance().get(Calendar.YEAR));\r\n        _yearView.setOnYearSelectedListener(new YearPickerView.OnYearSelectedListener() {\r\n            @Override\r\n            public void onYearChanged(YearPickerView view, int selectedYear) {\r\n                Log.d(\"----------------\", \"selected year = \" + selectedYear);\r\n                MonthPickerView.this._selectedYear = selectedYear;\r\n                _year.setText(\"\" + selectedYear);\r\n                _year.setTextColor(_headerFontColorSelected);\r\n                _month.setTextColor(_headerFontColorNormal);\r\n                if (_onYearChanged != null) {\r\n                    _onYearChanged.onYearChanged(selectedYear);\r\n                }\r\n            }\r\n        });\r\n        _month.setOnClickListener(new OnClickListener() {\r\n            @Override\r\n            public void onClick(View view) {\r\n                if (_monthList.getVisibility() == GONE) {\r\n                    _yearView.setVisibility(GONE);\r\n                    _monthList.setVisibility(VISIBLE);\r\n                    _year.setTextColor(_headerFontColorNormal);\r\n                    _month.setTextColor(_headerFontColorSelected);\r\n                }\r\n            }\r\n        });\r\n        _year.setOnClickListener(new OnClickListener(){\r\n\r\n            @Override\r\n            public void onClick(View view) {\r\n                if (_yearView.getVisibility() == GONE) {\r\n                    _monthList.setVisibility(GONE);\r\n                    _yearView.setVisibility(VISIBLE);\r\n                    _year.setTextColor(_headerFontColorSelected);\r\n                    _month.setTextColor(_headerFontColorNormal);\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n    protected void init(int year, int month) {\r\n        _selectedYear = year;\r\n        _selectedMonth = month;\r\n    }\r\n\r\n    protected void setMaxMonth(int maxMonth) {\r\n        if (maxMonth <= Calendar.DECEMBER && maxMonth >= Calendar.JANUARY) {\r\n            _monthViewAdapter.setMaxMonth(maxMonth);\r\n        } else {\r\n            throw new IllegalArgumentException(\"Month out of range please send months between \" +\r\n                    \"Calendar.JANUARY, Calendar.DECEMBER\");\r\n        }\r\n    }\r\n\r\n\r\n    protected void setMinMonth(int minMonth) {\r\n        if (minMonth >= Calendar.JANUARY && minMonth <= Calendar.DECEMBER) {\r\n            _monthViewAdapter.setMinMonth(minMonth);\r\n        } else {\r\n            throw new IllegalArgumentException(\"Month out of range please send months between\" +\r\n                    \" Calendar.JANUARY, Calendar.DECEMBER\");\r\n        }\r\n    }\r\n\r\n    protected void setMinYear(int minYear) {\r\n        _yearView.setMinYear(minYear);\r\n    }\r\n\r\n    protected void setMaxYear(int maxYear) {\r\n        _yearView.setMaxYear(maxYear);\r\n    }\r\n\r\n    protected void showMonthOnly() {\r\n        _showMonthOnly = true;\r\n        _year.setVisibility(GONE);\r\n    }\r\n\r\n    protected void showYearOnly() {\r\n        _monthList.setVisibility(View.GONE);\r\n        _yearView.setVisibility(VISIBLE);\r\n\r\n        _month.setVisibility(GONE);\r\n        _year.setTextColor(_headerFontColorSelected);\r\n    }\r\n\r\n    protected void setActivatedMonth(int activatedMonth) {\r\n        if (activatedMonth >= Calendar.JANUARY && activatedMonth <= Calendar.DECEMBER) {\r\n            _monthViewAdapter.setActivatedMonth(activatedMonth);\r\n           _month.setText(_monthNames[activatedMonth]);\r\n        } else {\r\n            throw new IllegalArgumentException(\"Month out of range please send months between Calendar.JANUARY, Calendar.DECEMBER\");\r\n        }\r\n\r\n    }\r\n\r\n    protected void setActivatedYear(int activatedYear) {\r\n        _yearView.setActivatedYear(activatedYear);\r\n        _year.setText(Integer.toString(activatedYear));\r\n    }\r\n\r\n    protected void setMonthRange(int minMonth, int maxMonth) {\r\n        if (minMonth < maxMonth) {\r\n            setMinMonth(minMonth);\r\n            setMaxYear(maxMonth);\r\n        } else {\r\n            throw new IllegalArgumentException(\"maximum month is less then minimum month\");\r\n        }\r\n    }\r\n\r\n    protected void setYearRange(int minYear, int maxYear) {\r\n        if (minYear < maxYear) {\r\n            setMinYear(minYear);\r\n            setMaxYear(maxYear);\r\n        } else {\r\n            throw new IllegalArgumentException(\"maximum year is less then minimum year\");\r\n        }\r\n    }\r\n\r\n    protected void setMonthYearRange(int minMonth, int maxMonth, int minYear, int maxYear) {\r\n        setMonthRange(minMonth, maxMonth);\r\n        setYearRange(minYear, maxYear);\r\n    }\r\n\r\n    protected void setTitle(String dialogTitle) {\r\n        if (dialogTitle != null && dialogTitle.trim().length() > 0) {\r\n            _title.setText(dialogTitle);\r\n            _title.setVisibility(VISIBLE);\r\n        } else {\r\n            _title.setVisibility(GONE);\r\n        }\r\n    }\r\n\r\n    protected int getMonth() {\r\n        return _selectedMonth;\r\n    }\r\n\r\n    protected int getYear() {\r\n        return _selectedYear;\r\n    }\r\n\r\n    protected void setOnMonthChangedListener(MonthPickerDialog.OnMonthChangedListener onMonthChangedListener) {\r\n        if (onMonthChangedListener != null) {\r\n            this._onMonthChanged = onMonthChangedListener;\r\n        }\r\n    }\r\n\r\n    protected void setOnYearChangedListener(MonthPickerDialog.OnYearChangedListener onYearChangedListener) {\r\n        if (onYearChangedListener != null) {\r\n            this._onYearChanged = onYearChangedListener;\r\n        }\r\n    }\r\n\r\n    public void setOnDateListener(OnDateSet onDateSet) {\r\n        this._onDateSet = onDateSet;\r\n    }\r\n\r\n    public void setOnCancelListener(OnCancel onCancel) {\r\n        this._onCancel = onCancel;\r\n    }\r\n\r\n\r\n    public interface OnDateSet{\r\n        void onDateSet();\r\n    }\r\n    public interface OnCancel{\r\n        void onCancel();\r\n    }\r\n\r\n    MonthPickerDialog.OnConfigChangeListener configChangeListener;\r\n\r\n    protected void setOnConfigurationChanged(MonthPickerDialog.OnConfigChangeListener configChangeListener){\r\n        this.configChangeListener = configChangeListener;\r\n    }\r\n\r\n    @Override\r\n    protected void onConfigurationChanged(Configuration newConfig) {\r\n        configChangeListener.onConfigChange();\r\n        super.onConfigurationChanged(newConfig);\r\n    }\r\n}\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/java/com/whiteelephant/monthpicker/MonthView.java",
    "content": "package com.whiteelephant.monthpicker;\r\n\r\nimport android.content.Context;\r\nimport android.content.res.Configuration;\r\nimport android.graphics.Canvas;\r\nimport android.graphics.Paint;\r\nimport android.util.AttributeSet;\r\nimport android.util.DisplayMetrics;\r\nimport android.util.TypedValue;\r\nimport android.view.MotionEvent;\r\nimport android.widget.ListView;\r\n\r\nimport com.example.prem.firstpitch.R;\r\n\r\nimport java.text.DateFormatSymbols;\r\nimport java.util.HashMap;\r\nimport java.util.Locale;\r\n\r\nclass MonthView extends ListView {\r\n\r\n    // constants\r\n    private static final int DEFAULT_HEIGHT = 100;\r\n    private static final int DEFAULT_NUM_DAYS = 4;\r\n    private static final int DEFAULT_NUM_ROWS = 3;\r\n    private static final int MAX_NUM_ROWS = 3;\r\n    private static final int DAY_SEPARATOR_WIDTH = 1;\r\n    // days to display\r\n    private int _numDays = DEFAULT_NUM_DAYS;\r\n    private int _numCells = _numDays;\r\n    private int _numRows = DEFAULT_NUM_ROWS;\r\n    // layout padding\r\n    private int _padding = 40;\r\n    private int _width;\r\n    private int _rowHeight = DEFAULT_HEIGHT;\r\n    // paints\r\n    private Paint _monthNumberPaint;\r\n    private Paint _monthNumberDisabledPaint;\r\n    private Paint _monthNumberSelectedPaint;\r\n    // month\r\n    private String[] _monthNames;\r\n    private int _monthTextSize;\r\n    private int _monthHeaderSize;\r\n    private int _monthSelectedCircleSize;\r\n    private int _monthBgSelectedColor;\r\n    private int _monthFontColorNormal;\r\n    private int _monthFontColorSelected;\r\n    private int _monthFontColorDisabled;\r\n    private int _maxMonth, _minMonth;\r\n    private int _rowHeightKey;\r\n    private int _selectedMonth = -1;\r\n    // listener\r\n    private OnMonthClickListener _onMonthClickListener;\r\n\r\n    public MonthView(Context context) {\r\n        this(context, null);\r\n    }\r\n\r\n    public MonthView(Context context, AttributeSet attrs) {\r\n        this(context, attrs, R.style.MonthPickerDialogStyle);\r\n    }\r\n\r\n    public MonthView(Context context, AttributeSet attrs, int defStyleAttr) {\r\n        super(context, attrs, defStyleAttr);\r\n\r\n        _monthNames = new DateFormatSymbols(Locale.getDefault()).getShortMonths();\r\n\r\n        DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();\r\n\r\n        _monthTextSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP,\r\n                16, displayMetrics);\r\n        _monthHeaderSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\r\n                16, displayMetrics);\r\n\r\n        if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {\r\n            _monthSelectedCircleSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\r\n                    43, displayMetrics);\r\n        } else {\r\n            _monthSelectedCircleSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\r\n                    43, displayMetrics);\r\n        }\r\n\r\n        _rowHeightKey = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\r\n                250, displayMetrics);\r\n        _rowHeight = (_rowHeightKey - _monthHeaderSize) / MAX_NUM_ROWS;\r\n\r\n        _padding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\r\n                16, displayMetrics);\r\n    }\r\n\r\n\r\n    /**\r\n     * Sets up the text and style properties for painting.\r\n     */\r\n    private void initView() {\r\n\r\n        _monthNumberSelectedPaint = new Paint();\r\n        _monthNumberSelectedPaint.setAntiAlias(true);\r\n        if (_monthBgSelectedColor != 0)\r\n            _monthNumberSelectedPaint.setColor(_monthBgSelectedColor);\r\n        // _monthNumberSelectedPaint.setAlpha(200);\r\n        _monthNumberSelectedPaint.setTextAlign(Paint.Align.CENTER);\r\n        _monthNumberSelectedPaint.setStyle(Paint.Style.FILL);\r\n        _monthNumberSelectedPaint.setFakeBoldText(true);\r\n\r\n        _monthNumberPaint = new Paint();\r\n        _monthNumberPaint.setAntiAlias(true);\r\n        if (_monthFontColorNormal != 0)\r\n            _monthNumberPaint.setColor(_monthFontColorNormal);\r\n        _monthNumberPaint.setTextSize(_monthTextSize);\r\n        _monthNumberPaint.setTextAlign(Paint.Align.CENTER);\r\n        _monthNumberPaint.setStyle(Paint.Style.FILL);\r\n        _monthNumberPaint.setFakeBoldText(false);\r\n\r\n        _monthNumberDisabledPaint = new Paint();\r\n        _monthNumberDisabledPaint.setAntiAlias(true);\r\n        if (_monthFontColorDisabled != 0)\r\n            _monthNumberDisabledPaint.setColor(_monthFontColorDisabled);\r\n        _monthNumberDisabledPaint.setTextSize(_monthTextSize);\r\n        _monthNumberDisabledPaint.setTextAlign(Paint.Align.CENTER);\r\n        _monthNumberDisabledPaint.setStyle(Paint.Style.FILL);\r\n        _monthNumberDisabledPaint.setFakeBoldText(false);\r\n    }\r\n\r\n    @Override\r\n    protected void onDraw(Canvas canvas) {\r\n        drawDays(canvas);\r\n    }\r\n\r\n    /**\r\n     * Draws the month days.\r\n     */\r\n    private void drawDays(Canvas canvas) {\r\n        int y = (((_rowHeight + _monthTextSize) / 2) - DAY_SEPARATOR_WIDTH) + _monthHeaderSize;\r\n        int dayWidthHalf = (_width - _padding * 2) / (_numDays * 2);\r\n        int j = 0;\r\n        for (int month = 0; month < _monthNames.length; month++) {\r\n            int x = (2 * j + 1) * dayWidthHalf + _padding;\r\n            if (_selectedMonth == month) {\r\n                canvas.drawCircle(x, y - (_monthTextSize / 3), _monthSelectedCircleSize, _monthNumberSelectedPaint);\r\n                if (_monthFontColorSelected != 0)\r\n                    _monthNumberPaint.setColor(_monthFontColorSelected);\r\n            } else {\r\n                if (_monthFontColorNormal != 0)\r\n                    _monthNumberPaint.setColor(_monthFontColorNormal);\r\n            }\r\n\r\n            final Paint paint = (month < _minMonth || month > _maxMonth) ?\r\n                    _monthNumberDisabledPaint : _monthNumberPaint;\r\n            canvas.drawText(_monthNames[month], x, y, paint);\r\n            j++;\r\n            if (j == _numDays) {\r\n                j = 0;\r\n                y += _rowHeight;\r\n            }\r\n        }\r\n    }\r\n\r\n\r\n    /**\r\n     * Calculates the day that the given x position is in, accounting for week\r\n     * number. Returns the day or -1 if the position wasn't in a day.\r\n     *\r\n     * @param x The x position of the touch event\r\n     * @return The day number, or -1 if the position wasn't in a day\r\n     */\r\n    private int getMonthFromLocation(float x, float y) {\r\n        int dayStart = _padding;\r\n        if (x < dayStart || x > _width - _padding) {\r\n            return -1;\r\n        }\r\n        // Selection is (x - start) / (pixels/day) == (x -s) * day / pixels\r\n        int row = (int) (y - _monthHeaderSize) / _rowHeight;\r\n        int column = (int) ((x - dayStart) * _numDays / (_width - dayStart - _padding));\r\n        int day = column + 1;\r\n        day += row * _numDays;\r\n        if (day < 0 || day > _numCells) {\r\n            return -1;\r\n        }\r\n        // position - 1 to match with Calender.JANUARY and Calender.DECEMBER\r\n        return day - 1;\r\n    }\r\n\r\n    /**\r\n     *  Called when the user clicks on a day. Handles callbacks to the\r\n     * {@link OnMonthClickListener} if one is set.\r\n     *\r\n     * @param day The day that was clicked\r\n     */\r\n    private void onDayClick(int day) {\r\n        if (_onMonthClickListener != null) {\r\n            _onMonthClickListener.onMonthClick(this, day);\r\n        }\r\n    }\r\n\r\n    protected void setColors(HashMap<String, Integer> colors) {\r\n        if (colors.containsKey(\"monthBgSelectedColor\") )\r\n            _monthBgSelectedColor = colors.get(\"monthBgSelectedColor\");\r\n        if (colors.containsKey(\"monthFontColorNormal\"))\r\n            _monthFontColorNormal = colors.get(\"monthFontColorNormal\");\r\n        if (colors.containsKey(\"monthFontColorSelected\"))\r\n            _monthFontColorSelected = colors.get(\"monthFontColorSelected\");\r\n        if (colors.containsKey(\"monthFontColorDisabled\"))\r\n            _monthFontColorDisabled = colors.get(\"monthFontColorDisabled\");\r\n        initView();\r\n    }\r\n\r\n    /**\r\n     * Handles callbacks when the user clicks on a time object.\r\n     */\r\n    public interface OnMonthClickListener {\r\n        void onMonthClick(MonthView view, int month);\r\n    }\r\n\r\n    public void setOnMonthClickListener(OnMonthClickListener listener) {\r\n        _onMonthClickListener = listener;\r\n    }\r\n\r\n    void setMonthParams(int selectedMonth, int minMonth, int maxMonth) {\r\n        _selectedMonth = selectedMonth;\r\n        this._minMonth = minMonth;\r\n        this._maxMonth = maxMonth;\r\n        _numCells = 12;\r\n\r\n    }\r\n\r\n    public void reuse() {\r\n        _numRows = DEFAULT_NUM_ROWS;\r\n    }\r\n\r\n\r\n    @Override\r\n    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\r\n        setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), _rowHeight * _numRows\r\n                + (_monthHeaderSize * 2));\r\n    }\r\n\r\n    @Override\r\n    protected void onSizeChanged(int w, int h, int oldw, int oldh) {\r\n        _width = w;\r\n    }\r\n\r\n    @Override\r\n    public boolean onTouchEvent(MotionEvent event) {\r\n        switch (event.getAction()) {\r\n            case MotionEvent.ACTION_UP:\r\n                int day = getMonthFromLocation(event.getX(), event.getY());\r\n                if (day >= 0) {\r\n                    onDayClick(day);\r\n                }\r\n                break;\r\n        }\r\n        return true;\r\n    }\r\n}\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/java/com/whiteelephant/monthpicker/MonthViewAdapter.java",
    "content": "package com.whiteelephant.monthpicker;\r\n\r\nimport android.content.Context;\r\nimport android.os.Build;\r\nimport android.util.Log;\r\nimport android.view.View;\r\nimport android.view.ViewGroup;\r\nimport android.widget.AbsListView;\r\nimport android.widget.BaseAdapter;\r\n\r\nimport com.example.prem.firstpitch.R;\r\n\r\nimport java.util.Calendar;\r\nimport java.util.HashMap;\r\n\r\n\r\nclass MonthViewAdapter extends BaseAdapter {\r\n\r\n    private int _minMonth, _maxMonth, _activatedMonth;\r\n    private Context _context;\r\n    private HashMap<String, Integer> _colors;\r\n    private OnDaySelectedListener mOnDaySelectedListener;\r\n\r\n    public MonthViewAdapter(Context context) {\r\n        this._context = context;\r\n        setRange();\r\n    }\r\n\r\n\r\n    @Override\r\n    public int getCount() {\r\n        return 1;\r\n    }\r\n\r\n    @Override\r\n    public Object getItem(int i) {\r\n        return null;\r\n    }\r\n\r\n    @Override\r\n    public long getItemId(int position) {\r\n        return position;\r\n    }\r\n\r\n    @Override\r\n    public View getView(int position, View convertView, ViewGroup viewGroup) {\r\n        final MonthView v;\r\n        if (convertView != null) {\r\n            v = (MonthView) convertView;\r\n        } else {\r\n            v = new MonthView(_context);\r\n            v.setColors(_colors);\r\n\r\n            // Set up the new view\r\n            final AbsListView.LayoutParams params = new AbsListView.LayoutParams(\r\n                    AbsListView.LayoutParams.MATCH_PARENT, AbsListView.LayoutParams.MATCH_PARENT);\r\n            v.setLayoutParams(params);\r\n            v.setClickable(true);\r\n            v.setOnMonthClickListener(mOnDayClickListener);\r\n        }\r\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\r\n            // If we're running on Honeycomb or newer, then we can use the Theme's\r\n            // selectableItemBackground to ensure that the View has a pressed state\r\n            v.setBackgroundDrawable(_context.getDrawable(R.drawable.month_ripplr));\r\n        }\r\n        v.setMonthParams(_activatedMonth, _minMonth, _maxMonth);\r\n        v.reuse();\r\n        v.invalidate();\r\n        return v;\r\n    }\r\n\r\n    private final MonthView.OnMonthClickListener mOnDayClickListener = new MonthView.OnMonthClickListener() {\r\n        @Override\r\n        public void onMonthClick(MonthView view, int day) {\r\n            Log.d(\"MonthViewAdapter\", \"onDayClick \" + day);\r\n            if (isCalendarInRange(day)) {\r\n                Log.d(\"MonthViewAdapter\", \"day not null && Calender in range \" + day);\r\n                setSelectedMonth(day);\r\n                if (mOnDaySelectedListener != null) {\r\n                    mOnDaySelectedListener.onDaySelected(MonthViewAdapter.this, day);\r\n                }\r\n            }\r\n        }\r\n    };\r\n\r\n    boolean isCalendarInRange(int value) {\r\n        return value >= _minMonth && value <= _maxMonth;\r\n    }\r\n\r\n    /**\r\n     * Updates the selected day and related parameters.\r\n     *\r\n     * @param month The day to highlight\r\n     */\r\n    public void setSelectedMonth(int month) {\r\n        Log.d(\"MonthViewAdapter\", \"setSelectedMonth : \" + month);\r\n        _activatedMonth = month;\r\n        notifyDataSetChanged();\r\n    }\r\n\r\n    /* set min and max date and years*/\r\n    public void setRange() {\r\n\r\n        _minMonth = Calendar.JANUARY;\r\n        _maxMonth = Calendar.DECEMBER;\r\n        _activatedMonth = Calendar.AUGUST;\r\n        notifyDataSetInvalidated();\r\n    }\r\n\r\n    /**\r\n     * Sets the listener to call when the user selects a day.\r\n     *\r\n     * @param listener The listener to call.\r\n     */\r\n    public void setOnDaySelectedListener(OnDaySelectedListener listener) {\r\n        mOnDaySelectedListener = listener;\r\n    }\r\n\r\n    public interface OnDaySelectedListener {\r\n        void onDaySelected(MonthViewAdapter view, int month);\r\n    }\r\n\r\n    void setMaxMonth(int maxMonth) {\r\n        if (maxMonth <= Calendar.DECEMBER && maxMonth >= Calendar.JANUARY) {\r\n            _maxMonth = maxMonth;\r\n        } else {\r\n            throw new IllegalArgumentException(\"Month out of range please send months between Calendar.JANUARY, Calendar.DECEMBER\");\r\n        }\r\n    }\r\n\r\n\r\n    void setMinMonth(int minMonth) {\r\n        if (minMonth >= Calendar.JANUARY && minMonth <= Calendar.DECEMBER) {\r\n            _minMonth = minMonth;\r\n        } else {\r\n            throw new IllegalArgumentException(\"Month out of range please send months between Calendar.JANUARY, Calendar.DECEMBER\");\r\n        }\r\n    }\r\n\r\n    void setActivatedMonth(int activatedMonth) {\r\n        if (activatedMonth >= Calendar.JANUARY && activatedMonth <= Calendar.DECEMBER) {\r\n            _activatedMonth = activatedMonth;\r\n        } else {\r\n            throw new IllegalArgumentException(\"Month out of range please send months between Calendar.JANUARY, Calendar.DECEMBER\");\r\n        }\r\n    }\r\n\r\n    void setColors(HashMap map) {\r\n        _colors = map;\r\n    }\r\n}\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/java/com/whiteelephant/monthpicker/YearPickerView.java",
    "content": "package com.whiteelephant.monthpicker;\r\n\r\nimport android.content.Context;\r\nimport android.content.res.Resources;\r\nimport android.support.annotation.DrawableRes;\r\nimport android.util.AttributeSet;\r\nimport android.util.Log;\r\nimport android.view.LayoutInflater;\r\nimport android.view.View;\r\nimport android.view.ViewGroup;\r\nimport android.widget.AdapterView;\r\nimport android.widget.BaseAdapter;\r\nimport android.widget.ListView;\r\nimport android.widget.TextView;\r\n\r\nimport com.example.prem.firstpitch.R;\r\n\r\nimport java.util.HashMap;\r\n\r\n\r\nclass YearPickerView extends ListView {\r\n\r\n    private Context _context;\r\n    final YearAdapter _adapter;\r\n    final int _viewSize;\r\n    final int _childSize;\r\n    OnYearSelectedListener _onYearSelectedListener;\r\n    HashMap<String, Integer> _colors;\r\n\r\n    public YearPickerView(Context context) {\r\n        this(context, null);\r\n    }\r\n\r\n    public YearPickerView(Context context, AttributeSet attrs) {\r\n        this(context, attrs, R.style.AppTheme);\r\n        super.setSelector(android.R.color.transparent);\r\n    }\r\n\r\n    public YearPickerView(Context context, AttributeSet attrs, int defStyleAttr) {\r\n        super(context, attrs, defStyleAttr);\r\n        this._context = context;\r\n        final LayoutParams frame = new LayoutParams(\r\n                LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\r\n        setLayoutParams(frame);\r\n        final Resources res = context.getResources();\r\n        _viewSize = res.getDimensionPixelOffset(R.dimen.datepicker_view_animator_height);\r\n        _childSize = res.getDimensionPixelOffset(R.dimen.datepicker_year_label_height);\r\n        setOnItemClickListener(new OnItemClickListener() {\r\n            @Override\r\n            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\r\n                final int year = _adapter.getYearForPosition(position);\r\n                _adapter.setSelection(year);\r\n                if (_onYearSelectedListener != null) {\r\n                    _onYearSelectedListener.onYearChanged(YearPickerView.this, year);\r\n                }\r\n            }\r\n        });\r\n        _adapter = new YearAdapter(getContext());\r\n        setAdapter(_adapter);\r\n    }\r\n\r\n    public void setOnYearSelectedListener(OnYearSelectedListener listener) {\r\n        _onYearSelectedListener = listener;\r\n    }\r\n\r\n    /**\r\n     * Sets the currently selected year. Jumps immediately to the new year.\r\n     *\r\n     * @param year the target year\r\n     */\r\n    public void setYear(final int year) {\r\n        _adapter.setSelection(year);\r\n        post(new Runnable() {\r\n            @Override\r\n            public void run() {\r\n                final int position = _adapter.getPositionForYear(year);\r\n                if (position >= 0 /*&& position < getCount()*/) {\r\n                    setSelectionCentered(position);\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n    public void setSelectionCentered(int position) {\r\n        final int offset = _viewSize / 2 - _childSize / 2;\r\n        setSelectionFromTop(position, offset);\r\n    }\r\n\r\n    public void setRange(int min, int max) {\r\n        _adapter.setRange(min, max);\r\n    }\r\n\r\n    public void setColors(HashMap<String, Integer> colors) {\r\n        this._colors = colors;\r\n    }\r\n\r\n    private class YearAdapter extends BaseAdapter {\r\n        private final int ITEM_LAYOUT = R.layout.year_label_text_view;\r\n        private final LayoutInflater __inflater;\r\n        private int __activatedYear;\r\n        private int __minYear, __maxYear, __count;\r\n\r\n        public YearAdapter(Context context) {\r\n            __inflater = LayoutInflater.from(context);\r\n        }\r\n\r\n        public void setRange(int min, int max) {\r\n            int count = max - min + 1;\r\n            if (__minYear != min || __maxYear != max || __count != count) {\r\n                __minYear = min;\r\n                __maxYear = max;\r\n                __count = count;\r\n                notifyDataSetInvalidated();\r\n            }\r\n        }\r\n\r\n        public boolean setSelection(int year) {\r\n            if (__activatedYear != year) {\r\n                __activatedYear = year;\r\n                notifyDataSetChanged();\r\n                return true;\r\n            }\r\n            return false;\r\n        }\r\n\r\n        @Override\r\n        public int getCount() {\r\n            return __count;\r\n        }\r\n\r\n        @Override\r\n        public Integer getItem(int position) {\r\n            return getYearForPosition(position);\r\n        }\r\n\r\n        @Override\r\n        public long getItemId(int position) {\r\n            return getYearForPosition(position);\r\n        }\r\n\r\n        public int getPositionForYear(int year) {\r\n            return year - __minYear;\r\n        }\r\n\r\n        public int getYearForPosition(int position) {\r\n            return __minYear + position;\r\n        }\r\n\r\n        @Override\r\n        public boolean hasStableIds() {\r\n            return true;\r\n        }\r\n\r\n        @Override\r\n        public View getView(int position, View convertView, ViewGroup parent) {\r\n            final TextView v;\r\n            final boolean hasNewView = convertView == null;\r\n            if (hasNewView) {\r\n                v = (TextView) __inflater.inflate(ITEM_LAYOUT, parent, false);\r\n            } else {\r\n                v = (TextView) convertView;\r\n            }\r\n            final int year = getYearForPosition(position);\r\n            final boolean activated = __activatedYear == year;\r\n\r\n            if (hasNewView || v.getTag() != null || v.getTag().equals(activated)) {\r\n                if (activated) {\r\n                    if(_colors.containsKey(\"monthBgSelectedColor\")) {\r\n                        v.setTextColor(_colors.get(\"monthBgSelectedColor\"));\r\n                    }\r\n                    v.setTextSize(25);\r\n                } else {\r\n                    if(_colors.containsKey(\"monthFontColorNormal\")) {\r\n                        v.setTextColor(_colors.get(\"monthFontColorNormal\"));\r\n                    }\r\n                    v.setTextSize(20);\r\n                }\r\n                v.setTag(activated);\r\n\r\n            }\r\n            v.setText(Integer.toString(year));\r\n            return v;\r\n        }\r\n\r\n        @Override\r\n        public int getItemViewType(int position) {\r\n            return 0;\r\n        }\r\n\r\n        @Override\r\n        public int getViewTypeCount() {\r\n            return 1;\r\n        }\r\n\r\n        @Override\r\n        public boolean isEmpty() {\r\n            return false;\r\n        }\r\n\r\n        @Override\r\n        public boolean areAllItemsEnabled() {\r\n            return true;\r\n        }\r\n\r\n        @Override\r\n        public boolean isEnabled(int position) {\r\n            return true;\r\n        }\r\n\r\n        protected void setMaxYear(int maxYear) {\r\n            __maxYear = maxYear;\r\n            __count = __maxYear - __minYear + 1;\r\n            notifyDataSetInvalidated();\r\n        }\r\n\r\n        protected void setMinYear(int minYear) {\r\n            __minYear = minYear;\r\n            __count = __maxYear - __minYear + 1;\r\n            notifyDataSetInvalidated();\r\n        }\r\n\r\n        protected void setActivatedYear(int activatedYear) {\r\n            if (activatedYear >= __minYear && activatedYear <= __maxYear) {\r\n                __activatedYear = activatedYear;\r\n                setYear(activatedYear);\r\n            } else {\r\n                throw new IllegalArgumentException(\"activated date is not in range\");\r\n            }\r\n        }\r\n\r\n    }\r\n\r\n    public int getFirstPositionOffset() {\r\n        final View firstChild = getChildAt(0);\r\n        if (firstChild == null) {\r\n            return 0;\r\n        }\r\n        return firstChild.getTop();\r\n    }\r\n\r\n    /**\r\n     * The callback used to indicate the user changed the year.\r\n     */\r\n    public interface OnYearSelectedListener {\r\n        /**\r\n         * Called upon a year change.\r\n         *\r\n         * @param view The view associated with this listener.\r\n         * @param year The year that was set.\r\n         */\r\n        void onYearChanged(YearPickerView view, int year);\r\n    }\r\n\r\n    protected void setMinYear(int minYear) {\r\n        _adapter.setMinYear(minYear);\r\n    }\r\n\r\n    protected void setMaxYear(int maxYear) {\r\n        _adapter.setMaxYear(maxYear);\r\n    }\r\n\r\n    protected void setActivatedYear(int activatedYear) {\r\n        _adapter.setActivatedYear(activatedYear);\r\n    }\r\n\r\n}\r\n\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/res/drawable-v21/month_ripplr.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ripple xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:color=\"#af0c0e\">\n    <item android:id=\"@android:id/mask\">\n        <shape android:shape=\"oval\">\n            <solid android:color=\"#af0c0e\" />\n        </shape>\n    </item>\n</ripple>"
  },
  {
    "path": "monthandyearpicker/src/main/res/layout/month_picker_dialog.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<com.whiteelephant.monthpicker.MonthPickerView xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    android:id=\"@+id/monthPicker\"\r\n    style=\"@style/MonthPickerDialogStyle\"\r\n    android:layout_width=\"wrap_content\"\r\n    android:layout_height=\"wrap_content\"\r\n    android:layout_gravity=\"center_horizontal\" />"
  },
  {
    "path": "monthandyearpicker/src/main/res/layout/month_picker_view.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"wrap_content\"\r\n    android:orientation=\"vertical\">\r\n\r\n    <include layout=\"@layout/month_view_header\" />\r\n\r\n    <RelativeLayout\r\n        android:id=\"@+id/picker_view\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\">\r\n\r\n        <ListView\r\n            android:id=\"@+id/listview\"\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"wrap_content\" />\r\n\r\n        <com.whiteelephant.monthpicker.YearPickerView\r\n            android:id=\"@+id/yearView\"\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"265dp\"\r\n            android:visibility=\"gone\" />\r\n    </RelativeLayout>\r\n\r\n    <RelativeLayout\r\n        android:id=\"@+id/action_btn_lay\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:paddingBottom=\"10dp\"\r\n        android:paddingRight=\"20dp\">\r\n\r\n        <TextView\r\n            android:id=\"@+id/ok_action\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:layout_alignParentRight=\"true\"\r\n            android:text=\"@android:string/ok\"\r\n            android:textAllCaps=\"true\"\r\n            android:paddingTop=\"10dp\"\r\n            android:paddingBottom=\"10dp\"\r\n            android:paddingRight=\"24dp\"\r\n            android:paddingLeft=\"24dp\"\r\n            android:textStyle=\"bold\"/>\r\n\r\n        <TextView\r\n            android:id=\"@+id/cancel_action\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:layout_toLeftOf=\"@+id/ok_action\"\r\n            android:text=\"@android:string/cancel\"\r\n            android:textAllCaps=\"true\"\r\n            android:paddingTop=\"10dp\"\r\n            android:paddingBottom=\"10dp\"\r\n            android:paddingRight=\"24dp\"\r\n            android:paddingLeft=\"24dp\"\r\n            android:textStyle=\"bold\"/>\r\n    </RelativeLayout>\r\n\r\n\r\n</LinearLayout>"
  },
  {
    "path": "monthandyearpicker/src/main/res/layout/month_view_header.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\"\r\n    android:id=\"@+id/header\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"wrap_content\"\r\n    android:gravity=\"center\"\r\n    android:orientation=\"vertical\"\r\n    android:paddingTop=\"16dp\">\r\n\r\n\r\n    <TextView\r\n        android:id=\"@+id/title\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:gravity=\"center\"\r\n        android:textSize=\"16sp\"\r\n        android:visibility=\"gone\"\r\n        android:textColor=\"@android:color/primary_text_dark_nodisable\"/>\r\n\r\n    <LinearLayout\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:gravity=\"center\">\r\n\r\n        <TextView\r\n            android:id=\"@+id/month\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:paddingBottom=\"20dp\"\r\n            android:paddingLeft=\"30dp\"\r\n            android:paddingRight=\"10dp\"\r\n            tools:text=\"@string/label_month\"\r\n            android:textSize=\"35sp\"\r\n            android:textColor=\"@android:color/primary_text_dark_nodisable\"/>\r\n\r\n        <TextView\r\n            android:id=\"@+id/year\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:paddingBottom=\"20dp\"\r\n            android:paddingLeft=\"10dp\"\r\n            android:paddingRight=\"30dp\"\r\n            tools:text=\"@string/label_year\"\r\n            android:textSize=\"35sp\"\r\n            android:textColor=\"@android:color/primary_text_dark_nodisable\"/>\r\n    </LinearLayout>\r\n</LinearLayout>"
  },
  {
    "path": "monthandyearpicker/src/main/res/layout/year_label_text_view.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"wrap_content\"\r\n    android:layout_gravity=\"center\"\r\n    android:gravity=\"center\"\r\n    android:minHeight=\"50dp\" />\r\n\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/res/layout-land/month_picker_view.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"horizontal\">\n\n\n    <include\n        layout=\"@layout/month_view_header\"\n        android:layout_width=\"0dp\"\n        android:layout_height=\"match_parent\"\n        android:layout_weight=\"3\" />\n\n    <LinearLayout\n        android:layout_width=\"0dp\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"5\"\n        android:orientation=\"vertical\">\n\n        <RelativeLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\">\n\n            <RelativeLayout\n                android:id=\"@+id/action_btn_lay\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentBottom=\"true\"\n                android:paddingBottom=\"10dp\"\n                android:paddingRight=\"20dp\">\n\n                <TextView\n                    android:id=\"@+id/ok_action\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentRight=\"true\"\n                    android:paddingBottom=\"10dp\"\n                    android:paddingLeft=\"24dp\"\n                    android:paddingRight=\"24dp\"\n                    android:paddingTop=\"10dp\"\n                    android:text=\"@android:string/ok\"\n                    android:textAllCaps=\"true\"\n                    android:textStyle=\"bold\" />\n\n                <TextView\n                    android:id=\"@+id/cancel_action\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_toLeftOf=\"@+id/ok_action\"\n                    android:paddingBottom=\"10dp\"\n                    android:paddingLeft=\"24dp\"\n                    android:paddingRight=\"24dp\"\n                    android:paddingTop=\"10dp\"\n                    android:textAllCaps=\"true\"\n                    android:text=\"@android:string/cancel\"\n                    android:textStyle=\"bold\" />\n            </RelativeLayout>\n\n            <RelativeLayout\n                android:id=\"@+id/picker_view\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_above=\"@+id/action_btn_lay\">\n\n                <ListView\n                    android:id=\"@+id/listview\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\" />\n\n                <com.whiteelephant.monthpicker.YearPickerView\n                    android:id=\"@+id/yearView\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"265dp\"\n                    android:visibility=\"gone\" />\n            </RelativeLayout>\n\n        </RelativeLayout>\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "monthandyearpicker/src/main/res/layout-land/month_view_header.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/header\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:layout_gravity=\"center\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\"\n    android:paddingTop=\"16dp\">\n\n\n    <TextView\n        android:id=\"@+id/title\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/primary_text_dark_nodisable\"\n        android:textSize=\"16sp\"\n        android:visibility=\"gone\" />\n\n    <TextView\n        android:id=\"@+id/month\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:paddingTop=\"20dp\"\n        android:textColor=\"@android:color/primary_text_dark_nodisable\"\n        android:textSize=\"30sp\" />\n\n    <TextView\n        android:id=\"@+id/year\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:paddingTop=\"8dp\"\n        android:textColor=\"@android:color/primary_text_dark_nodisable\"\n        android:textSize=\"30sp\" />\n</LinearLayout>"
  },
  {
    "path": "monthandyearpicker/src/main/res/layout-v11/month_picker_view.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\">\n\n    <include layout=\"@layout/month_view_header\" />\n\n    <RelativeLayout\n        android:id=\"@+id/picker_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\">\n\n        <ListView\n            android:id=\"@+id/listview\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\" />\n\n        <com.whiteelephant.monthpicker.YearPickerView\n            android:id=\"@+id/yearView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"265dp\"\n            android:visibility=\"gone\" />\n    </RelativeLayout>\n\n    <RelativeLayout\n        android:id=\"@+id/action_btn_lay\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:paddingBottom=\"10dp\"\n        android:paddingRight=\"20dp\">\n\n\n        <TextView\n            android:id=\"@+id/ok_action\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentRight=\"true\"\n            android:text=\"@android:string/ok\"\n            android:textAllCaps=\"true\"\n            android:paddingTop=\"8dp\"\n            android:paddingBottom=\"8dp\"\n            android:paddingRight=\"24dp\"\n            android:paddingLeft=\"24dp\"\n            android:textStyle=\"bold\"\n            android:foreground=\"?android:attr/selectableItemBackground\"/>\n\n        <TextView\n            android:id=\"@+id/cancel_action\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_toLeftOf=\"@+id/ok_action\"\n            android:text=\"@android:string/cancel\"\n            android:textAllCaps=\"true\"\n            android:paddingTop=\"8dp\"\n            android:paddingBottom=\"8dp\"\n            android:paddingRight=\"24dp\"\n            android:paddingLeft=\"24dp\"\n            android:textStyle=\"bold\"\n            android:foreground=\"?android:attr/selectableItemBackground\"/>\n    </RelativeLayout>\n\n\n</LinearLayout>"
  },
  {
    "path": "monthandyearpicker/src/main/res/layout-v11/year_label_text_view.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:layout_gravity=\"center\"\n    android:gravity=\"center\"\n    android:background=\"?android:attr/selectableItemBackground\"\n    android:minHeight=\"50dp\" />\n\n"
  },
  {
    "path": "monthandyearpicker/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <declare-styleable name=\"monthPickerDialog\">\n\n       <!-- Header Style -->\n        <attr name=\"headerTitleColor\" format=\"color\" />\n        <attr name=\"headerBgColor\" format=\"color\" />\n        <attr name=\"headerFontColorSelected\" format=\"color\" />\n        <attr name=\"headerFontColorNormal\" format=\"color\" />\n        <!-- Month Picker style -->\n        <attr name=\"monthBgColor\" format=\"color\" />\n        <attr name=\"monthBgSelectedColor\" format=\"color\" />\n        <attr name=\"monthFontColorSelected\" format=\"color\" />\n        <attr name=\"monthFontColorNormal\" format=\"color\" />\n        <attr name=\"monthFontColorDisabled\" format=\"color\" />\n        <attr name=\"dialogActionButtonColor\" format=\"color\" />\n\n\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "monthandyearpicker/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<resources>\r\n    <color name=\"fontWhiteEnable\">#FFF</color>\r\n    <color name=\"fontWhiteDisable\">#85FFFFFF</color>\r\n    <color name=\"fontBlackEnable\">#000000</color>\r\n    <color name=\"fontBlackDisable\">#50000000</color>\r\n</resources>\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/res/values/dimens.xml",
    "content": "<resources>\r\n    <!-- Default screen margins, per the Android Design guidelines. -->\r\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\r\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\r\n\r\n\r\n    <dimen name=\"datepicker_view_animator_height\">50dp</dimen>\r\n    <dimen name=\"datepicker_year_label_height\">50dp</dimen>\r\n</resources>\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/res/values/strings.xml",
    "content": "<resources>\r\n    <string name=\"app_name\">MonthAndYear Picker</string>\r\n\r\n    <string name=\"label_month\">MONTH</string>\r\n    <string name=\"label_year\">YEAR</string>\r\n\r\n</resources>\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/res/values/styles.xml",
    "content": "<resources>\r\n\r\n    <!-- Base application theme. -->\r\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat\"/>\r\n\r\n\r\n    <style name=\"MonthPickerDialogStyle\" >\r\n        <!-- Customize month picker theme here. -->\r\n       <!-- <item name=\"monthBgColor\">#FFFFFF</item>\r\n        <item name=\"monthBgSelectedColor\">#FF4081</item>\r\n        <item name=\"monthFontColorSelected\">#ffffff</item>\r\n        <item name=\"monthFontColorNormal\">#000000</item>\r\n        <item name=\"monthFontColorDisabled\">#33000000</item>\r\n\r\n        <item name=\"headerBgColor\">#FF4081</item>\r\n        <item name=\"headerFontColorSelected\">#ffffff</item>\r\n        <item name=\"headerFontColorNormal\">#85ffffff</item>\r\n        <item name=\"headerTitleColor\">#ffffff</item>-->\r\n    </style>\r\n\r\n\r\n</resources>\r\n"
  },
  {
    "path": "monthandyearpicker/src/main/res/values-w820dp/dimens.xml",
    "content": "<resources>\r\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\r\n         (such as screen margins) for screens with more than 820dp of available width. This\r\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\r\n    <dimen name=\"activity_horizontal_margin\">64dp</dimen>\r\n</resources>\r\n"
  },
  {
    "path": "sample/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "sample/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 27\n    buildToolsVersion '27.0.3'\n\n    defaultConfig {\n        applicationId \"com.whiteelephant.monthpickersample\"\n        minSdkVersion 14\n        targetSdkVersion 27\n        versionCode 1\n        versionName \"1.0\"\n\n        testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"\n\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation project(':monthandyearpicker')\n    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {\n        exclude group: 'com.android.support', module: 'support-annotations'\n    })\n    implementation 'com.android.support:appcompat-v7:27.0.1'\n    testImplementation 'junit:junit:4.12'\n}\n"
  },
  {
    "path": "sample/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /Users/prem/Library/Android/sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "sample/src/androidTest/java/com/whitelephant/monthpickersample/ExampleInstrumentedTest.java",
    "content": "package com.whitelephant.monthpickersample;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegistry;\nimport android.support.test.runner.AndroidJUnit4;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport static org.junit.Assert.assertEquals;\n\n/**\n * Instrumentation test, which will execute on an Android device.\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n    @Test\n    public void useAppContext() throws Exception {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getTargetContext();\n\n        assertEquals(\"com.whiteelephant.monthpickersample\", appContext.getPackageName());\n    }\n}\n"
  },
  {
    "path": "sample/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.whiteelephant.monthpickersample\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppThemePicker_2\">\n        <activity android:name=\".MainActivity\"\n            android:label=\"Month Picker\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>"
  },
  {
    "path": "sample/src/main/java/com/whiteelephant/monthpickersample/MainActivity.java",
    "content": "package com.whiteelephant.monthpickersample;\n\nimport android.app.DatePickerDialog;\nimport android.content.res.Configuration;\nimport android.content.res.Resources;\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\nimport android.util.Log;\nimport android.view.View;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport com.whiteelephant.monthpicker.MonthPickerDialog;\n\nimport java.util.Calendar;\nimport java.util.Locale;\n\npublic class MainActivity extends AppCompatActivity {\n\n    String TAG = \"MainActivity\";\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n\n        //applyLocale();\n\n        setNormalPicker();\n\n        // goto styles.xml and change the monthPickerStyles for below three layouts\n\n        //setBottleView();\n        //chooseMonthOnly();\n        //chooseYearOnly();\n    }\n\n\n    private void applyLocale() {\n        Locale locale = new Locale(\"hi\");\n        Locale.setDefault(locale);\n\n        Resources res = getResources();\n        Configuration config = new Configuration(res.getConfiguration());\n        config.locale = locale;\n        getBaseContext().getResources().updateConfiguration(config,\n                getBaseContext().getResources().getDisplayMetrics());\n    }\n\n    private void setNormalPicker() {\n        setContentView(R.layout.activity_main);\n        final Calendar today = Calendar.getInstance();\n        findViewById(R.id.month_picker).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                MonthPickerDialog.Builder builder = new MonthPickerDialog.Builder(MainActivity.this, new MonthPickerDialog.OnDateSetListener() {\n                    @Override\n                    public void onDateSet(int selectedMonth, int selectedYear) {\n                        Log.d(TAG, \"selectedMonth : \" + selectedMonth + \" selectedYear : \" + selectedYear);\n                        Toast.makeText(MainActivity.this, \"Date set with month\" + selectedMonth + \" year \" + selectedYear, Toast.LENGTH_SHORT).show();\n                    }\n                }, today.get(Calendar.YEAR), today.get(Calendar.MONTH));\n\n                builder.setActivatedMonth(Calendar.JULY)\n                        .setMinYear(1990)\n                        .setActivatedYear(2017)\n                        .setMaxYear(2030)\n                        .setMinMonth(Calendar.FEBRUARY)\n                        .setTitle(\"Select trading month\")\n                        .setMonthRange(Calendar.FEBRUARY, Calendar.NOVEMBER)\n                        // .setMaxMonth(Calendar.OCTOBER)\n                        // .setYearRange(1890, 1890)\n                        // .setMonthAndYearRange(Calendar.FEBRUARY, Calendar.OCTOBER, 1890, 1890)\n                        //.showMonthOnly()\n                        // .showYearOnly()\n                        .setOnMonthChangedListener(new MonthPickerDialog.OnMonthChangedListener() {\n                            @Override\n                            public void onMonthChanged(int selectedMonth) {\n                                Log.d(TAG, \"Selected month : \" + selectedMonth);\n                                // Toast.makeText(MainActivity.this, \" Selected month : \" + selectedMonth, Toast.LENGTH_SHORT).show();\n                            }\n                        })\n                        .setOnYearChangedListener(new MonthPickerDialog.OnYearChangedListener() {\n                            @Override\n                            public void onYearChanged(int selectedYear) {\n                                Log.d(TAG, \"Selected year : \" + selectedYear);\n                                // Toast.makeText(MainActivity.this, \" Selected year : \" + selectedYear, Toast.LENGTH_SHORT).show();\n                            }\n                        })\n                        .build()\n                        .show();\n\n            }\n        });\n\n        findViewById(R.id.date_picker).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Calendar cal = Calendar.getInstance();\n                DatePickerDialog dialog = new DatePickerDialog(MainActivity.this, null, 2017,\n                        cal.get(Calendar.MONTH), cal.get(Calendar.DATE));\n                dialog.show();\n            }\n        });\n    }\n\n    private void chooseMonthOnly() {\n        setContentView(R.layout.activity_choose_month);\n\n        findViewById(R.id.choose_month).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                MonthPickerDialog.Builder builder = new MonthPickerDialog.Builder(MainActivity.this, new MonthPickerDialog.OnDateSetListener() {\n                    @Override\n                    public void onDateSet(int selectedMonth, int selectedYear) {\n\n                    }\n                }, /* activated number in year */ 3, 5);\n\n                builder.showMonthOnly()\n                        .build()\n                        .show();\n            }\n        });\n    }\n\n    int choosenYear = 2017;\n\n    private void chooseYearOnly() {\n        setContentView(R.layout.activity_choose_year);\n\n        final TextView year = (TextView) findViewById(R.id.year);\n        findViewById(R.id.choose_year).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                MonthPickerDialog.Builder builder = new MonthPickerDialog.Builder(MainActivity.this, new MonthPickerDialog.OnDateSetListener() {\n                    @Override\n                    public void onDateSet(int selectedMonth, int selectedYear) {\n                        year.setText(Integer.toString(selectedYear));\n                        choosenYear = selectedYear;\n                    }\n                }, choosenYear, 0);\n\n                builder.showYearOnly()\n                        .setYearRange(1990, 2030)\n                        .build()\n                        .show();\n            }\n        });\n    }\n\n    private void setBottleView() {\n\n        setContentView(R.layout.activity_bottle);\n\n        LinearLayout chooseQty = (LinearLayout) findViewById(R.id.select_quantity);\n        final TextView qty = (TextView) findViewById(R.id.qty);\n\n\n        chooseQty.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                MonthPickerDialog.Builder builder = new MonthPickerDialog.Builder(MainActivity.this, new MonthPickerDialog.OnDateSetListener() {\n                    @Override\n                    public void onDateSet(int selectedMonth, int selectedYear) {\n                        qty.setText(Integer.toString(selectedYear));\n                    }\n                }, /* activated number in year */ 3, 0);\n\n                builder.setActivatedMonth(Calendar.JULY)\n                        // .setMaxMonth(Calendar.OCTOBER)\n                        //.setMinYear(1990)\n                        //.setActivatedYear(3)\n                        //.setMinMonth(Calendar.FEBRUARY)\n                        //.setMaxYear(2030)\n                        .setTitle(\"Select Quantity\")\n                        //.setMonthRange(Calendar.FEBRUARY, Calendar.NOVEMBER)\n                        .setYearRange(1, 15)\n                        // .setMonthAndYearRange(Calendar.FEBRUARY, Calendar.OCTOBER, 1890, 1890)\n                        //.showMonthOnly()\n                        .showYearOnly()\n                        .build()\n                        .show();\n            }\n        });\n\n    }\n\n}\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_bottle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#fff\"\n    android:orientation=\"vertical\">\n\n    <ImageView\n        android:layout_width=\"200dp\"\n        android:layout_height=\"350dp\"\n        android:layout_gravity=\"center\"\n        android:layout_marginTop=\"40dp\"\n        android:src=\"@drawable/bottle\" />\n\n\n    <LinearLayout\n        android:id=\"@+id/select_quantity\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"40dp\"\n        android:layout_gravity=\"center\"\n        android:paddingRight=\"40dp\"\n        android:paddingLeft=\"40dp\"\n        android:background=\"@color/colorAccent\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Quantity : \"\n            android:textColor=\"#fff\"\n            android:textSize=\"30sp\"\n            android:layout_gravity=\"center\"\n            android:fontFamily=\"cursive\"/>\n\n        <TextView\n            android:id=\"@+id/qty\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"3\"\n            android:gravity=\"center\"\n            android:textColor=\"#fff\"\n            android:textSize=\"40sp\"\n            android:fontFamily=\"cursive\" />\n\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/activity_choose_month.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\" android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#fff\">\n\n    <Button\n        android:id=\"@+id/choose_month\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Choose Month\"\n        android:layout_centerInParent=\"true\"/>\n\n\n</RelativeLayout>"
  },
  {
    "path": "sample/src/main/res/layout/activity_choose_year.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#fff\"\n    android:orientation=\"vertical\">\n\n\n    <Button\n        android:id=\"@+id/choose_year\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:text=\"Choose Year\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_above=\"@+id/choose_year\"\n        android:layout_centerInParent=\"true\"\n        android:layout_marginBottom=\"20dp\"\n        android:gravity=\"center\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Select Year : \"\n            android:textColor=\"@color/colorAccent\"\n            android:textSize=\"18sp\" />\n\n        <TextView\n            android:id=\"@+id/year\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"2017\"\n            android:textColor=\"@color/colorAccent\"\n            android:textSize=\"22sp\" />\n\n    </LinearLayout>\n</RelativeLayout>"
  },
  {
    "path": "sample/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/activity_main\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    android:paddingBottom=\"@dimen/activity_vertical_margin\"\n    android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n    android:paddingRight=\"@dimen/activity_horizontal_margin\"\n    android:paddingTop=\"@dimen/activity_vertical_margin\"\n    tools:context=\"com.whiteelephant.monthpickersample.MainActivity\">\n\n    <Button\n        android:id=\"@+id/month_picker\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:gravity=\"center\"\n        android:text=\"Month Picker\" />\n\n    <Button\n        android:id=\"@+id/date_picker\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"30dp\"\n        android:gravity=\"center\"\n        android:text=\"Date Picker\"\n        android:layout_gravity=\"center\" />\n\n</LinearLayout>\n"
  },
  {
    "path": "sample/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"colorPrimaryDark\">#303F9F</color>\n    <color name=\"colorAccent\">#FF397F</color>\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">sample</string>\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <!--<style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>-->\n\n\n<!-- Blue color picker -->\n    <!--    <style name=\"MonthPickerDialogStyle\" >\n            <item name=\"monthBgColor\">#111E5D</item>\n             <item name=\"monthBgSelectedColor\">#30C8BB</item>\n             <item name=\"monthFontColorSelected\">#ffffff</item>\n             <item name=\"monthFontColorNormal\">#4C5CA9</item>\n             <item name=\"monthFontColorDisabled\">#33000000</item>\n\n             <item name=\"headerBgColor\">#111E5D</item>\n             <item name=\"headerFontColorSelected\">#30C8BB</item>\n             <item name=\"headerFontColorNormal\">#8530C8BB</item>\n             <item name=\"headerTitleColor\">#30C8BB</item>\n\n            <item name=\"dialogActionButtonColor\">#30C8BB</item>\n        </style>\n        -->\n\n    <!-- White color picker -->\n    <style name=\"AppThemePicker_2\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <item name=\"colorPrimary\">#fff</item>\n        <item name=\"colorPrimaryDark\">#EFEFEF</item>\n        <item name=\"colorAccent\">#FF8173</item>\n    </style>\n\n    <!-- for normal picker -->\n\n   <!-- <style name=\"MonthPickerDialogStyle\" >\n        <item name=\"monthBgColor\">#fff</item>\n        <item name=\"monthBgSelectedColor\">#FF8173</item>\n        <item name=\"monthFontColorSelected\">#fff</item>\n        <item name=\"monthFontColorNormal\">#000000</item>\n        <item name=\"monthFontColorDisabled\">#33000000</item>\n\n        <item name=\"headerBgColor\">#FF8173</item>\n        <item name=\"headerFontColorSelected\">#fff</item>\n        <item name=\"headerFontColorNormal\">#85FFFFFF</item>\n        <item name=\"headerTitleColor\">#fff</item>\n\n        <item name=\"dialogActionButtonColor\">#FF8173</item>\n    </style>-->\n\n\n    <!-- for bottle screen -->\n\n    <style name=\"MonthPickerDialogStyle\" >\n        <item name=\"monthBgColor\">#fff</item>\n        <item name=\"monthBgSelectedColor\">@color/colorAccent</item>\n        <item name=\"monthFontColorSelected\">#fff</item>\n        <item name=\"monthFontColorNormal\">#000000</item>\n        <item name=\"monthFontColorDisabled\">#33000000</item>\n\n        <item name=\"headerBgColor\">@color/colorAccent</item>\n        <item name=\"headerFontColorSelected\">#fff</item>\n        <item name=\"headerFontColorNormal\">#85FFFFFF</item>\n        <item name=\"headerTitleColor\">#fff</item>\n\n        <item name=\"dialogActionButtonColor\">@color/colorAccent</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values-w820dp/dimens.xml",
    "content": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as screen margins) for screens with more than 820dp of available width. This\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\n    <dimen name=\"activity_horizontal_margin\">64dp</dimen>\n</resources>\n"
  },
  {
    "path": "sample/src/test/java/com/whiteelphant/monthpickersample/ExampleUnitTest.java",
    "content": "package com.whiteelphant.monthpickersample;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "settings.gradle",
    "content": "include ':monthandyearpicker', ':sample'\r\ninclude ':app', ':app'\r\n"
  }
]