Yep, that's correct. There isn't a good way of requesting a dynamic size, since some home screens may need to pre-reserve the area needed.
In the forecast widget I wrote that offers multiple sizes, I solved it using exactly the approach you described--a separate widget definition for each size. All widgets, regardless of size, still used the same backend service to perform all the updates, which keeps code duplication to a minimum. http://www.jsharkey.org/blog/2009/04/24/forecast-widget-for-android-15-with-source/ j On Fri, Apr 24, 2009 at 3:27 PM, Joel <jkluss...@gmail.com> wrote: > > I want to create an app widget that could take up a different number > of "cells" on the home screen, but I don't think that the app widget > framework easily supports this. I know that an app widget can have a > configuration screen, and I'd like the user to be able select a sort > of small, medium, or large size for the widget as part of my > configuration activity. Unfortunately, I don't think that this is > possible, correct? Based on the minWidth and minHeight properties, > the Launcher app will assign a number of cells that I can't configure > at run time if I understand correctly. > > For instance, if I want a weather widget that has a current, hourly, > and weekly format that take up 1, 2, and 4 cells respectively, I can't > do this at run time. Instead, I believe my only option is to export 3 > different widgets and have them all listed in the widget picker dialog > as something like "Weather - current conditions", "Weather - hourly > forcast", and "Weather - week long forcast". > > Is my understanding correct, or am I missing something? > > Joel > > > -- Jeff Sharkey jshar...@google.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---