在我的应用中,我想要一个创建日历事件的功能。我这样打开“新日历事件” Activity :
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("title", "Some title");
intent.putExtra("description", "Some description");
intent.putExtra("beginTime", eventStartInMillis);
intent.putExtra("endTime", eventEndInMillis);
startActivity(intent);
它在普通 Android 上完美运行。在 HTC Sense 上,我只有一个问题 - 结束时间设置不正确,总是比开始时间晚一小时。可能是什么问题?
最佳答案
问题是我的代码中有一个错误 - eventEndInMillis 的值是错误的,它比 eventStartInMillis 小。
关于android - 打开 "new calendar event" Activity 的 Intent ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2911731/