在android启动器中添加默认小部件

时间:2017-05-14 12:11:35

标签: android android-widget android-launcher

我正在尝试使用git的launcher3 OSP。我在default_workspace.xml文件中添加了一个小部件,但默认情况下小部件不会显示在主屏幕中。我应该为此做些什么吗?

default_workspace.xml

<favorites xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3">



<appwidget
    launcher:className="com.sec.android.widgetapp.digitalclock.DigitalClockWidgetProvider"
    launcher:packageName="com.sec.android.widgetapp.digitalclock"
    launcher:screen="2"
    launcher:spanX="2"
    launcher:spanY="2"
    launcher:x="1"
    launcher:y="0" />

<!-- Hotseat -->
<include launcher:workspace="@xml/dw_tablet_hotseat" />

<!-- Bottom row -->
<favorite
    launcher:screen="0"
    launcher:x="0"
    launcher:y="-1"
    launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_CONTACTS;end" />

<resolve
    launcher:screen="0"
    launcher:x="-1"
    launcher:y="-1" >
    <favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MARKET;end" />
    <favorite launcher:uri="market://details?id=com.android.launcher" />
</resolve>

0 个答案:

没有答案
相关问题