I'm trying to draw a "gauge" on the screen with information from
various sensors.  I have a class that extends Drawable and a custom
view that during construction creates a new AnimationDrawable and sets
the only frame to my custom Drawable.  I then start the
AnimationDrawable from my Activity onWindowFocusChanged method.  My
custom Drawable onDraw method is only called once though.  Is that by
design (as in onDraw is called for each frame once and it's cached and
shown over and over) or am I doing something wrong?

[code from custom view's constructor]
        _gaugeAnimation = new AnimationDrawable();
        _gaugeAnimation.setOneShot(false);
        setBackgroundDrawable(_gaugeAnimation);

        GaugeDrawable gauge = new GaugeDrawable();
        gauge.setTargetValue(100);
        _gaugeAnimation.addFrame(gauge, 500);
        _gaugeAnimation.setVisible(true, false);
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to