Hello,

I've built an app widget -- a fairly simple one -- that draws an image
inside a frame. (If that sounds familiar, that's because it's very
similar to the built-in one, but it's a start to something else.)

The RemoteView consists of little more than a FrameView and an
ImageView. I have a second FrameView that may display or not depending
on some certain state awareness.

The Image updates on an Alarm schedule rather than the built-in
mechanism so the user can adjust this value after installation. The
image is set on the RemoteView using a drawable ID from included
resources in the package. They've been resized to approximately a
quarter of the screen size, but might still be scaled a little by the
ImageView.

All of this has been working fine. There is one issue that I've been
unable to diagnose even the root of the problem.

After an orientation change when the home screen redraws, the
ImageView doesn't always draw. The rest of the RemoteView does draw
just as it was set during the most recent Update.

The mystery is that the ImageView does, in fact, draw if the Alarm is
currently set. If it's not currently set, it doesn't draw. Nothing
else seems to affect whether it draws or not. It doesn't matter if the
widget process is running or not, either (killing it via DDMS and then
rotating has the same effect).

This occurs in the emulator as well as the G1.

During a rotate, the widget gets no update event at all.  I could set
it to listen for configuration changed broadcasts, but since it works
in one of the cases, I suspect something else is going on and that's
just an unnecessary piece of duct tape.

Anyone know what's going on or have any ideas?

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