您可以使用
calendar view执行此操作…使用setDate(长日期)方法将日历上的日期设置为您想要的日期
您也可以通过向日历添加事件来完成此操作
创建日历的意图
Intent calIntent = new Intent(Intent.ACTION_INSERT);
calIntent.setData(CalendarContract.Events.CONTENT_URI);
startActivity(calIntent)
播种日历日期和时间
Intent calIntent = new Intent(Intent.ACTION_INSERT);
calIntent.setType("vnd.android.cursor.item/event");
calIntent.putExtra(Events.TITLE, "Title here");
calIntent.putExtra(Events.EVENT_LOCATION, "Location here");
calIntent.putExtra(Events.DESCRIPTION, "Description here");
GregorianCalendar calDate = new GregorianCalendar(, 7, 15);
calIntent.putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY, true);
calIntent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME,
calDate.getTimeInMillis());
calIntent.putExtra(CalendarContract.EXTRA_EVENT_END_TIME,
calDate.getTimeInMillis());
startActivity(calIntent);
这方面的一个例子可以在here看到