I want to display a CalendarView and then change backgound of certain blocks (of dates) red and certain blocks green. Now, I don't think I can do that in default CalendarView.
So, I started googling about how to create a custom CalendarView and I came to know that creating a custom CalendarView is impossible. We have to use a GridView.
So, I just wanted to know that is that really true and if it is not then how should I go about making a custom CalendarView
There is a library available now known as ZCustomCalendar which allows you to define individual custom views for various types of dates.
Related
I'm trying to create a custom calendar in Android. I want to create somethning like this
custom calendar.
As you can see the design is slightly different than normal date picker for android. I tried to change it in xml, but like I found out, it isnt possible. So my question is - how to do that? Should I create custom class which extend from DatePicker? I was trying to find the solution by myself, but I found only answers to change color etc, but I want to also change design and font.
I will be very grateful for your help
I would like to add dots below specific dates, anyone knows if it's possible with the Material Components?
It's a similar problem to the one here - it does not seem to be currently supported by the MaterialDatePicker.
Feature request submitted here, feel free to back it up.
Update
The feature has been implemented and it's now possible to add a dot below days in the Material DatePicker. The material catalog has a very clear example of such an implementation.
You need to extend the DayViewDecorator class and override one of the getCompoundDrawable methods to create the drawable (little circle under each desired date) - in this case it would be getCompoundDrawableBottom.
I have been making a Digital Clock App Widget, and I have a font I'd like to use, however I can not make a custom View. Tried it, seems like it is not intended to work in a widget(I found out later that I can't use custom views in widgets). And I would really like to have that font, any suggestions?
I need custom calendar like CKCalendar in iOS - https://github.com/jaykz52/CKCalendar
In CKCalendar iOS I can set colors of days, can disable dates for touch.
Is there anything similar for Android?
Check out Times Square by Square. It might not have the exact customizations you want but it's customizable enough so that you can modify to suit your needs.
I am going to create a new appliction that will use a calendar. Do I need to use a third-party calendar, or does Android provide an API to make calendars?
There is no Calendar component that ships with Android. Your best bet is to create one using a GridView that you will bind to an adapter containing all the days of a given month.
Android does have a CalendarView from 3.0 but there is no setAdapter(). You might want to either want to use a gridView and set the # of columns to 7 (note there might me a space left to the right to which you could set the padding to -1/-2). Otherwise the best is to use a ScrollView and build the grid yourself.