On Fri, Jan 27, 2012 at 8:31 AM, Kostya Vasilyev <kmans...@gmail.com> wrote:

> I don't see anything in the source for RemoteViews that would do that,
> maybe I'm not looking well enough.
>

Yeah, I briefly stepped through the source and didn't see anything obvious.
But then my eyes glazed over =) I haven't had to spend much time with the
source so I thought I'd ask first before trudging through and trying to
make sense of it all.


> My suggestion would be -- for debugging purposes only -- to simulate a
> RemoteViews update cycle within your own application, checking the result,
> and stepping through the code if necessary.
>
> By this I mean: writing your "views" object into a Parcelable, cloning a
> new instance from that Parcelable, inflating your widget's root layout, and
> applying the cloned RemoteViews.
>

Good idea - I'll give that a shot this weekend. Gah, and this was going so
well >:(


> Oh, and one more thing: your widget updates are all executed from one
> place in the code, updating everything at once -- the views, the pending
> intents if any, the background images -- right?
>

Well, I do update them in 3 places: onUpdate() to set up the widgets from
configured data when necessary; in the configuration Activity when I'm done
setting up the widget to initialize it; and then in this IntentService when
it's called on tapping the widget.

But this is the only place that updates the widget after it's been
configured and added to the home screen. And it works as expected if it's
not the same layout being added to the LinearLayout (whether it's in a loop
or sequentially) so I don't think my layout is being modified anywhere else.

Thanks.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
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

Reply via email to