Tuesday, 18 October 2016

Adding a Custom CalendarView Using Android Studio to Highlight Event Dates

For the past six months or so I have been trying to add a calendar to my android app without success. I have the calendar widget that comes with Android Studio but that has limited functionality. I googled Custom CalendarView and found that Caldroid was the recommended custom calendar to use. However its not that easy to implement especially for a novice like myself. Then I stumbled upon CompactCalendarView by SundeepK which was easier to implement. It can be found at the link below:

https://github.com/SundeepK/CompactCalendarView

It only took 4 steps:

  • Add the dependency to the build.gradle app file
  • Add the CompactCalendarView widget to your XML layout file
  • Add the gist below to your main activity file
  • Run your program.




Below is a youtube video that helps you with the steps.





6 comments:

  1. Can you please tell, what format is this "1477040400000L".

    ReplyDelete
    Replies
    1. that is a long value. its the time in seconds that have passed from 1970.

      Delete
    2. C'est pour définir la date ou auras lieux l’événement ? car j'aimerais bien choisir une autre date .

      Delete
  2. i was not able to sync the gradle with the dependency provided
    can you help me please ?

    ReplyDelete
  3. Dot is not showing please help...

    ReplyDelete
  4. Event Toast not showing only else toast showing

    ReplyDelete