打开&QUOT意向;新的日历事件"活动 [英] Intent that opens "new calendar event" activity
本文介绍了打开&QUOT意向;新的日历事件"活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用程序,我希望有一个功能来创建日历事件。我打开新的日历事件这样的活动:
In my app, I want a functionality to create calendar event. I open "new calendar event" activity like this:
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的,我只有一个问题 - 结束时间设置不正确,它总是开始时间后一小时。可以采取什么问题?
It works perfectly on stock Android. On HTC Sense, I have only one issue - end time is not set correctly, it's always one hour after begin time. What can be the problem?
推荐答案
问题是,我在我的code的错误 - eventEndInMillis的价值是错误的,这是小然后eventStartInMillis
The problem was that I had a bug in my code - the value of eventEndInMillis was wrong and it was smaller then eventStartInMillis.
这篇关于打开&QUOT意向;新的日历事件"活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文