badoualy / datepicker-timeline

An infinite scrolling timeline to pick a date
MIT License
464 stars 71 forks source link

Year on MonthView functionality lost? #10

Closed rrreche closed 7 years ago

rrreche commented 7 years ago

Hello,

in the sample app, I can see that the year can be displayed in the MonthView, jkust beneath. Checking the the library embedded in the sample code, I can see the following lines in MonthViewHolder private class:

void bind(int year, int month, boolean selected, boolean beforeSelection) {
            this.year = year;
            this.month = month;

            String text = MONTHS[month].substring(0, 3).toUpperCase(Locale.US);
            **if (yearDigitCount > 0) {
                text += yearOnNewLine ? "\n" : " ";
                text += year % (int) Math.pow(10, yearDigitCount);
            }**
            lbl.setText(text);
            int color = selected ? colorSelected : beforeSelection ? colorBeforeSelection : defaultColor;
            lbl.setTextColor(color);
            indicator.setColor(color);
            indicator.setCircleSizeDp(selected ? 12 : 5);
        }

Where this same method lacks the part if(yearDigitCount > 0){} . This seems lost in 1.0.1. Was it removed on purpose? Or this the gradle link not updated?

EDIT. Ah well, I checked the commits, I guess this is not in the gradle release yet. I will try using the library directly in my code. Awesome job man! Keep it up :) Thanks!