How to add custom widget to Launcher3 as default widget

I tried to add my own widget to android Launcher3 (nexus 5, lolipop), I edit the default_workspace_4x4.xml file and add this code

<appwidget
    launcher:packageName="com.my.widget"
    launcher:className="com.my.widget.ui.widgets.custom"
    launcher:container="-100"
    launcher:screen="0"
    launcher:x="0"
    launcher:y="0"
    launcher:spanX="4"
    launcher:spanY="1" />

      

Do you know what I am doing wrong?

+3


source to share





All Articles