Calendar view for Android GingerBread and before (

2019-01-08 23:27发布

问题:

I'm having an HTML table with dates and details. I want to show it in a calendar view. I've found the built-in API 11 CalendarView, but I can't inflate it when I'm using API 8 (which I need...)

PS. I don't need a fully functioning calendar. I just want to show this information.

Is there any way to solve it?

回答1:

As you mentioned, there is no way to show a calendar in older api levels, but you can try some open source projects:

  • android-calendar-view
  • CalendarView


回答2:

I wrote Caldroid library (https://github.com/roomorama/Caldroid) that is simple to setup and have many features such as setup min/max date, disabled dates, select date range etc. It's quite easy to customize the look and feel. Just to share if someone might find it useful :)



回答3:

You could grab the source code to CalendarView and try using it in your own project in your own package. Off the cuff, it would appear to be buildable from the SDK.

Otherwise, use an existing third-party solution as Macarse suggests.



回答4:

I guess this question is a bit old yet but there is yet the Android-Week-View which is available from API 9 (and I'm working on it to make it compatible from even lower).

It has no MonthView but the code is pretty clear and easy to understand and it has been implemented directly from the view class. There is a good and active community behind it as well.