> There is no onUpdate on configuration changes. The home screen recreates > your widget, then takes the most recent RemoteViews and applies it to the > widget. >
I figured that it was recreating the Widget on rotation. The problem is, I don't seem to be getting any messages to that effect, and have no way (that I can see) of re-establishing the connection. How can I determine that a rotate has happened and set up a new onClick connection? Thanks On Jan 14, 1:28 am, Kostya Vasilyev <kmans...@gmail.com> wrote: > Each and every update you push to the wigdget with RemoteViews has to have > complete widget state, including all images, text, and pending intents. > > There is no onUpdate on configuration changes. The home screen recreates > your widget, then takes the most recent RemoteViews and applies it to the > widget. > > If your codes tries to update the widget incrementally, piece-by-piece, with > one RemoteViews specifying the intent, and another, repeated, update setting > some changing information, then you end up with the most recent RemoteViews > only having your changing text, but no PendingIntent. > > This is very much unlike how Activities work, where the entire view > hierarchy is kept in memory for as long as the activity is on the screen > (and maybe longer). > > -- Kostya > > 2011/1/14 Anbu <anbu.ezhi...@gmail.com> > > > It is because, the widget becomes unresponsive when the display mode > > is changed from portrait to landscape. I had the same issue and I what > > I had done is for every RemoteView update I had send all the > > pendingintent to make it work > > > On Jan 14, 4:26 pm, John Gaby <jg...@gabysoft.com> wrote: > > > I have an App Widget on the Home screen which works fine until the > > > screen is auto-rotated. At that point, the onClick connection (set up > > > via a call to setOnClickPendingIntent) is lost. The only way I seem > > > to be able to get it back is to delete the Widget from the Home screen > > > and then add it back. Is there some kind of message that tells me > > > that the screen has rotated that I need to respond to (and reestablish > > > the connection)? > > > > Thanks > > > -- > > 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<android-developers%2bunsubscr...@googlegroups.com> > > 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 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