Thanks for the response but the animation is a set of bitmaps that I show, it can't be done with the Android shapes. So I need this approach. However I was thinking if I can find a way to use the alfa approach in my need. Or anything that would bring a similar fade-in/ out effect Is it possible?
On 20 Mar, 17:36, Justin Anderson <magouyaw...@gmail.com> wrote: > Is there any particular reason you are using a frame-based animation? I > haven't done any frame-based animations, but I know you could accomplish > the same (or very similar) thing using an AnimationSet defined in XML. > > You could then specify a rotation to the image as well as a fade in/out > with alpha... > > As a simple example, this could go in res/anim and be called something like > spin_fade_in.xml: > > <?xml version="1.0" encoding="utf-8"?> > <set xmlns:android="http://schemas.android.com/apk/res/android"> > <alpha > adroid:fromAlpha="0.0" > android:toAlpha="1.0" > android:duration="500" > android:startOffset="0" > > /> > > <scale android:fromXScale="1" > android:toXScale=".85" android:fromYScale="1" > android:toYScale=".85" android:duration="100" > android:startOffset="0" android:pivotX="50%" > android:pivotY="50%" /> <rotate > android:fromDegrees="0" android:toDegrees="360" > android:pivotX="50%" android:pivotY="50%" > android:duration="500" android:startOffset="0" /> > <scale android:fromXScale=".85" android:toXScale="1" > android:fromYScale=".85" android:toYScale="1" > android:duration="100" android:startOffset="400" > android:pivotX="50%" android:pivotY="50%" /> > </set> > > Thanks, > Justin Anderson > MagouyaWare Developerhttp://sites.google.com/site/magouyaware > > On Tue, Mar 20, 2012 at 10:24 AM, Serdel <adam.lichwierow...@gmail.com>wrote: > > > Hi, > > > I am running an animation of a spinning star and I would like to add > > some fade-in/fade-out effects. I am loading the animation in Java by > > making the AnimationDrawable objects, and adding the bitmaps as frames > > and then setting it to an ImageView using setBackgroundDrawable. I > > there a way I can add fade-in fade-out effects to this animation? I > > couldn't find any help on that subjects so far. > > > -- > > 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 > > -- 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