James, I don't have the answer, but I would like to amend your question.
Switching views is one thing, but what if there are versions of the same widget that have different sizes? Minimal widget size is specified in res/<widget>.xml, using <appwidget-provider minWidth & minHeight>. Is it posible to specify different sizes depending on what widget version the users selects in my configuration activity (or some other way)? I know it works with HTC Sense for its own widgets (e.g. clock, weather...), but they might have changed Android to allow for this. Is there a way to do it with stock Android firmware? -- Kostya 2010/5/28 James W <[email protected]> > I suspect the answer is no, but it only seems possible at the moment > to update an AppWidget via a RemoteViews object which is inflated from > a static XML file. > > Is there any way to build a RemoteViews object on the fly, or edit the > layout of one that is already there? > > The requirement is that I dont know until runtime exactly how many > ImageViews I want to display in my AppWidget. > > Currently I am setting all the ImageViews I may need in the layout XML > file as invisible and then just making the ones I want visible, but am > I then limited to what I have in the XML file to start with. It would > be far more convenient to be able to just add the ones I need on the > fly, and set their properties when updating. > > Anyone know if there is a way to do that? > > Thanks > James > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

