开发者

Android (App)Widget identification

Im writing little widget that shows time, date.. with many settings. And I want to have multiple instances of this widget with diferent settings. Is there any way to identify widget instance. I mean is it posible to se开发者_StackOverflowt persistant id on witget instance so Ill know on update that I have to use setting for for example witget one?


yes.

if you read the tutorial at http://developer.android.com/guide/topics/appwidgets/index.html#Configuring you'll see many references to mAppWidgetId/appWidgetIds/etc. This is a unique Id per instance of your widget. you can associate this Id with your configuration info.


You might also want to consider a configuration activity that will launch every time an instance of your widget is created, you can configure what time (or) details the user wants on the screen.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜