【发布时间】:2012-11-13 20:22:41
【问题描述】:
我有一个配置活动和同一个应用程序的多个应用程序小部件。当我在应用小部件主机上安装应用小部件时,首先配置活动被触发,然后它调用所选应用小部件的更新功能。 到现在为止,我做了以下几件事:
1. I have created three appwidgetproviderinfo in xml file for small, medium and large app widget
2. have created three layouts for small, medium and large app widget, with the same components. These three layouts differ only in height and width.
3. have created three app widget provider class.
4. have defined these receivers in manifest file.
5. have created one configuration activiy.
现在,根据开发人员指南,当 App Widget 使用配置 Activity 时,Activity 负责在配置完成时更新 App Widget。我们可以通过直接从 AppWidgetManager 请求更新来做到这一点。 配置活动如何识别应用小部件提供者是小型、中型还是大型?它如何更新多尺寸应用小部件?
【问题讨论】:
标签: java android android-widget android-appwidget