在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):tyczj/GoogleCalendarView开源软件地址(OpenSource Url):https://github.com/tyczj/GoogleCalendarView开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):ExtendedCalendarViewThis project is meant for people who want to display a calendar view and show that there are events on certain days. What I did was pull out the calendar view from Google's Calendar application found here. It is still a work in progress but the project should run. The example project pulls events from the google calendar provider and inserts them into the examples database https://github.com/android/platform_packages_apps_calendar. Implementation is not the easiest though as there is a lot to it but I hope to filter out stuff that is not needed to try to make it simpler A quick run though of how to use it: in your activity before you set the content view you need to create a Calendar Controller
The put in the MonthByWeekFragment to your view
You also need to override handleEvent, this gets called when you click on a day on the calendar and gets called when you click on an event in the day view
Calendar Content ProviderTo display events on the calendar I have build a content provider that the calendar uses which replicates how it is done in googles calendar app. things that it needs is the start and end date in a milliseconds timestamp. those should go in the START and END columns of the database
You also need to get the julian start/end day from the timestamp like so
the put them in the start day and end day columns of the database
The last thing you need in the database is the start/end time in minutes and put them in the start time and end time columns
Follow me on Google+ https://plus.google.com/107013202469298721562/posts |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论