2、“添加事件”界面中,输入标题、位置,指定时间等,并注意设置提醒时间后,点击“完成”即可。
3、完成以上步骤后,我们就可以在日历页面,查看到事件列表和详情。
具体如下:1、我们一般从开始菜单打开日历应用,可以在拼音R中找到
2、初次使用,可能新事件会点不开,可以到隐私中设置一下,打开开始菜单——设置
3、点击打开“隐私”
4、隐私——日历
5、在日历设置中,打开“允许应用访问我的日历”(如果已经开启了,就先关闭一下,再开启即可)
6、再打开日历,点击新事件就可以使用了。
详细修改如下:1.首先准备各种大小的ic_newevents_numberindication.9.png图片。
如果是搞开发的,在以前的项目中都可以找到的。
2.定义个未读信息支持的app事件xml,这个支持短信,日历,电话,邮件:
b/packages/apps/Launcher3/res/xml/unread_support_shortcuts.xml
内容如下:
+<?xml version="1.0" encoding="UTF-8"?>
+<unreadshortcuts xmlns:launcher="http://schemas.android.com/apk/res-
auto/com.android.launcher3">
+
+<shortcut
+launcher:unreadPackageName="com.android.dialer"
+launcher:unreadClassName="com.android.dialer.DialtactsActivity"
+launcher:unreadType="0"
+launcher:unreadKey="com_android_contacts_unread"
+ />
+ <shortcut
+launcher:unreadPackageName="com.android.mms"
+launcher:unreadClassName="com.android.mms.ui.BootActivity"
+launcher:unreadType="0"
+launcher:unreadKey="com_android_mms_unread"
+ />
+ <shortcut
+launcher:unreadPackageName="com.android.email"
+launcher:unreadClassName="com.android.email.activity.Welcome"
+launcher:unreadType="0"
+launcher:unreadKey="com_android_email_unread"
+ />
+ <shortcut
+launcher:unreadPackageName="com.android.calendar"
+launcher:unreadClassName="com.android.calendar.AllInOneActivity"
+launcher:unreadType="0"
+launcher:unreadKey="com_android_calendar_unread"
+ />
+ <shortcut
+launcher:unreadPackageName="com.orangelabs.rcs"
+
launcher:unreadClassName="com.mediatek.rcse.activities.ChatMainActivity"
+launcher:unreadType="0"
+launcher:unreadKey="com_android_rcse_unread"
+/>
+<shortcut
+launcher:unreadPackageName="com.android.cellbroadcastreceiver"
+
launcher:unreadClassName="com.android.cellbroadcastreceiver.CellBroadcastLis
tActivity"
+launcher:unreadType="0"
+launcher:unreadKey="com_android_calendar_unread"
+/>
+<shortcut
+launcher:unreadPackageName="com.mediatek.cellbroadcastreceiver"
+
launcher:unreadClassName="com.mediatek.cellbroadcastreceiver.CellBroadcastLi
stActivity"
+launcher:unreadType="0"
+launcher:unreadKey="com_mediatek_cellbroadcastreceiver_unread"
+/>
+</unreadshortcuts>
3.添加几种需要用到而之前没有的权限:
b/packages/apps/Launcher3/AndroidManifest.xml
<original-package android:name="com.android.launcher3" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
+<uses-permission
android:name="android.permission.ADVANCED_WIDGET_API"/>
+<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
+<uses-permission android:name="android.permission.INSTALL_PACKAGES"/>
+<uses-permission android:name="android.permission.DELETE_PACKAGES"/>
4.定义要用的字符串:b/packages/apps/Launcher3/res/values/attrs.xml
+ <!-- XML attributes used by unread_support_shortcuts.xml -->
+<declare-styleable name="UnreadShortcut">
+ <attr name="unreadPackageName" format="string" />
+<attr name="unreadClassName" format="string" />
+<attr name="unreadKey" format="string" />
+<attr name="unreadType" format="integer" />
+</declare-styleable>
5.定义显示的数字大小尺寸,这个可以自己修改到满意,这个是四行五列排列的
1080*1920屏幕大小的尺寸。
b/packages/apps/Launcher3/res/values/dimens.xml
+ <!-- Add for unread events feature. -->
+<dimen name="unread_minWidth">20dp</dimen>
+<dimen name="hotseat_unread_margin_top">16dp</dimen>
+<dimen name="hotseat_unread_margin_right">8dp</dimen>
+<dimen name="folder_unread_margin_top">16dp</dimen>
+<dimen name="folder_unread_margin_right">14dp</dimen>
+<dimen name="workspace_unread_margin_top">16dp</dimen>
+<dimen name="workspace_unread_margin_right">16dp</dimen>
+<dimen name="app_list_unread_margin_top">20dp</dimen>
+<dimen name="app_list_unread_margin_right">16dp</dimen>
+<dimen name="unread_text_margin">8dp</dimen>
+<dimen name="unread_text_number_size">14sp</dimen>
+<dimen name="unread_text_plus_size">10sp</dimen>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)