3

I am using a calendar view inside a dialog fragment .I am getting the one as shown below. I am using the default calendarview provided.

Actual Calendar View

But instead i want to get a calendar view as this one , which is shown by default in xml when i add:

Desired Calndar View

I have tried changing the style to Widget.DeviceDefault.Light.CalendarView , Widget.Material.CalendarView but with same effect.

Gaurav
  • 667
  • 2
  • 13
  • 28

3 Answers3

1

If you're using prolificinteractive materialcalendarview library, to change header style for year and month.

check my answer here: How can I change Android MaterialCalendarView month color?

Akhtar Khan
  • 259
  • 2
  • 13
0

I don't know How to create Custom Calendar but you might check this GitHub library.You may succeed in creating the one, you are asking for with just little customization

https://github.com/prolificinteractive/material-calendarview

And also Refer to this Useful Stackoverflow post from which you will definitely be able to implement a CalenderView as you wanted.

Custom Android calendarView

EffyCoder
  • 48
  • 1
  • 6
Harsh Sharma
  • 898
  • 1
  • 14
  • 30
0

At first I didn't understand why CalendarView component looks different in Android Studio and on my phone, but then I found this post https://stackoverflow.com/a/45368436/11052714

So the reason you are seeing this on your phone is because of API level. In the post I mentioned above, however I think wrong API level is mentioned, because I have the old calendar view with Android version 5.0.2 aka API level 21. It means that still in API level 21 old Calendar View visual look is used.

JuniorDev
  • 3
  • 3