New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display days of previous and current months #114
Display days of previous and current months #114
Conversation
Thanks for the pull request, please refer to the comments on #117 for now. |
… and next months in the current month grid Added an attribute to choose the text color of the days of the other months
bc8b335
to
b693591
Compare
I've rebased your changes from master on my branch. It's ready for review. |
…://github.com/JulienArzul/CompactCalendarView into JulienArzul-@enhancement/#46_display_days_of_other_months
Thanks for the changes. I think they look good to me. I don't think it's documented anywhere but there are some screenshot tests here: https://github.com/SundeepK/CompactCalendarView/blob/master/sample/src/androidTest/java/sundeepk/github/com/sample/ApplicationTest.java It's based on the sample application and provides a way todo regression tests. To make sure things don't break in the future. It uses facebook screenshot-tests-for-android: That repo has some prerequisites before you can run the tests. But it's all documented in the github readme. Then in the root of the project you can run:
First you will need to run recordMode to record and save your screenshot and commit that single screenshot and then verifyMode to run the tests. It would be good to get a few tests for this, i.e. set the date and enable this feature to see the previous/next month days. Maybe we can add for 2 different month to make sure we cover different months with different amount of days, like Feb and Dec, etc. You should also pull from master once again. |
Hi @JulienArzul will you be implementing the tests? If not I am more than happy to do them and merge them to master if not. |
Hey, sorry I didn't answer earlier. I don't have much time to work on this right now so you can go ahead and implement them if it's not too much of a bother for you. Otherwise, I'll probably be able to do this in a few weeks. |
@JulienArzul Many thanks, I'll pull your changes and add some tests and merge to master. Then I'll close this pull request. |
…months works as expected.
Maybe we can add the option to support when the user taps on a day out of the current month, on the
I know I´m using |
I just realized that there`s a bug on my piece of code. If you tap on the headers of the view it takes it as a day of the previous month.
|
I'm not sure the library should let the user click on days out of the current month. Or if it does, it should probably scroll the calendar to the clicked month and then select the day. |
@rathn I think for that we shoud disscuss that in another issue if possible. Since this is specific to just showing those extra days. |
Merged, will release sometime soon. Thanks again! |
Hi,
I've added the possibility on a given month to display the days of the previous and next month as explained in the issue #46
The code is pretty straightforward. I've added two attributes to keep it optional (one to use the feature and one to set the color of the text) and it's disabled by default to keep retro-compatibility.