开发者

Is there is any API to make a calendar in Android?

开发者 https://www.devze.com 2023-02-04 00:42 出处:网络
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开发者_如何学Python?There is no Calendar compon

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开发者_如何学Python?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消