I'm having trouble getting AlphaAnimation to work. Can anyone explain
why the following patch to
com.example.android.apis.graphics.AnimateDrawables.java in the
provided samples does not produce an image that fades away?
--- AnimateDrawables.java.orig 2010-04-05 12:56:45.000000000 -0500
+++ AnimateDrawables.java 2010-04-05 12:57:39.000000000 -0500
@@ -46,7 +46,8 @@
Drawable dr =
context.getResources().getDrawable(R.drawable.beach);
dr.setBounds(0, 0, dr.getIntrinsicWidth(),
dr.getIntrinsicHeight());
- Animation an = new TranslateAnimation(0, 100, 0, 200);
+ Animation an = new AlphaAnimation(1.0f, 0.0f);
an.setDuration(2000);
an.setRepeatCount(-1);
an.initialize(10, 10, 10, 10);
I know that the Drawable properly responds to setAlpha(). I also
tried ensuring that the Transformation in
com.example.android.apis.graphics.AnimateDrawable.java was
setTransformationType(Transformation.TYPE_BOTH), even though I suspect
that is the default setting.
Is there some requirement of the View to allow for animated alpha
transparency that I'm missing?
Thanks for any help or explanation.
Iain
--
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
To unsubscribe, reply using "remove me" as the subject.