开发者

I've made an app, how do I create a widget to go with it?

I have successfully built an Android App using the SDK. A number of users are asking for a widget to also be made available with the sa开发者_如何学编程me data. What's the easiest method of implementing this? Can I leverage of my current code project?


There are plenty of resources. You need to add the following to your manifest for starters:

<receiver android:name="ExampleAppWidgetProvider" >
<intent-filter>
    <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
           android:resource="@xml/example_appwidget_info" />

http://developer.android.com/guide/topics/appwidgets/index.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜