Monday, April 16, 2012

[android-developers] Re: creating a window-close animation effect

I'm still searching. I found that with the ScaleAnimator i can achieve what i need, but still trying with no success. This is the code i'm using:

               ScaleAnimation anim=new ScaleAnimation(1,1,0,0);
               anim.setFillAfter(true);
               anim.setFillEnabled(true);
               anim.setInterpolator(new android.view.animation.AccelerateInterpolator());
               anim.setDuration(1000L);

This is the ImageView i'm creating to store the new image. This image is updated by a native function.

               ImageView image = new ImageView(instance.getContext());
               image.setImageBitmap(sScreenBitmap);
               image.setVisibility(ImageView.VISIBLE);
               image.startAnimation(anim);

This is called from another view. However, nothing happens on screen.

TIA.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate