Hi,

I am updating a widget project for Moto Milestone / Droid.

Found something strange:

When I slide out the keyboard, and the screen changes orientation, my widget is redrawn, and Android even uses the layout file from layout-land. So far so good.

However, the widget is not notified in any way - onUpdate is not called, and ACTION_CONFIGURATION_CHANGED cannot be received through manifest, can't be registered for with registerReceiver, and is removed for widgets in 2.0.

Apparently, Milestone caches the most recent RemoteViews update and uses it to re-create the widget and update its state.

One negative side effect is that my widget sets up PendingIntent for the user clicking on the widget. This is done in onUpdate(), but not - for effeciency - later, when the widget is incrementally updated.

I am able to work around this by always including a PendingIntent for clicks each and every I update the widget.

My second app is a bit more complex, though, and this workaround might not work.

Has anyone else ran into this issue with Droid / Milestone? Any thoughts on why ACTION_CONFIGURATION_CHANGED support for removed for widgets in 2.0?

-- Kostya

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