Android Calendar View - How to customize Calendar View to make it like Google Calendar App one?

passer picture passer · Aug 11, 2015 · Viewed 9.3k times · Source

In recent Google Calendar App , it has a calendar which can be pulled down to show, and display in the style like this:

enter image description here

I wanted to build a Calendar like this to the App, but when I put the android API CalendarView to the app, its style is very different:

enter image description here

So, the problem is how could I style/customize the CalendarView to like the one in Google Calendar App?

Also, for Google Calendar App's calendar, when there is an event on a particulate, there will be "small dots" under the date text (Like the 19th and 21th of Augest in the above Google Calendar's image). How to achieve something like this, when I am having a list of dates (NOT events of android calendar, just a list of dates) and wanted to mark a dot on these dates on the Calendar, like what the Google Calendar App did?

Answer

Anirudh Sharma picture Anirudh Sharma · Aug 11, 2015

I wanted to build a Calendar like this to the App

You can use This Library to achieve what you want.

In recent Google Calendar App , it has a calendar which can be pulled down to show

You can hide/show your calendar view using animations.

there will be "small dots" under the date text

I've achieved this using this library but you need to study it a bit and modify it.This is using a canvas to build the calendar view and You can add circles on your dates using the x,y coordinates of these dates.Just pass the dates to this lib and use drawCircle() method for canvas.