好吧,我读的文档非常precisely此处的http://developer.android.com/guide/topics/providers/calendar-provider.html#update-event和书面的东西是这样的:
Ok, I read docs very precisely here: http://developer.android.com/guide/topics/providers/calendar-provider.html#update-event and its written something like this:
// Here is an example of an intent that sets a new title for a specified event and lets users edit the event in the Calendar.
long eventID = 208;
Uri uri = ContentUris.withAppendedId(Events.CONTENT_URI, eventID);
Intent intent = new Intent(Intent.ACTION_EDIT)
.setData(uri)
.putExtra(Events.TITLE, "My New Title");
startActivity(intent);
对于我来说这是行不通的 - 它打开正确的事件,但它不能编辑它 - 所有字段是只读的。字段只有我可以改变的时区,并提醒。其他的一切都为只读。难道我做错了什么?
For me it doesn't work - it opens correct event, but it's NOT POSSIBLE to edit it - all fields are read only. Only fields what I can change are Timezone, and Reminder. Everything other is read only. Am I doing something wrong?
我的API级别为14(ICS)
My API level is 14 (ICS)
所以我不认为你做错了什么 - 我放在一起的同样的事情,基本实现通过命令行和相同限制也适用:
So I don't think you're doing anything wrong - I put together a basic implementation of the same thing via command line and the same restriction applies:
am start -a android.intent.action.EDIT --es title "New Title" content://com.android.calendar/events/1
我只能够编辑相同的字段你是 - 你可能会更好做了 ACTION_VIEW
键,让用户决定编辑(对不起,我不对你更好的答案,这是一种烦人)
I'm only able to edit the same fields you are - You might be better off doing a ACTION_VIEW
and letting the user decide to edit (sorry I don't have a better answer for you, that's kind of annoying)
上一篇:添加绘制到CirclePageIndicatorCirclePageIndicator
下一篇:Android的SwipeRefreshLayout如何实现canChildScrollUp如果孩子没有一个ListView或滚动型如何实现、孩子、SwipeRefreshLayout、Android