ImageView myImageView = (ImageView)findViewById(R.id.my_imageview); AnimationSet animSet = new AnimationSet(true); animSet.setInterpolator(new DecelerateInterpolator()); animSet.setFillAfter(true); animSet.setFillEnabled(true); final RotateAnimation animRotate = new RotateAnimation(0.0f, -90.0f, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f); animRotate.setDuration(1500); animRotate.setFillAfter(true); animSet.addAnimation(animRotate); myImageView.startAnimation(animSet);
// Scaling Animation scale = new ScaleAnimation(fromXscale, toXscale, fromYscale, toYscale, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); // 1 second duration scale.setDuration(1000); // Moving up Animation slideUp = new TranslateAnimation(fromX, toX, fromY, toY); // 1 second duration slideUp.setDuration(1000); // Animation set to join both scaling and moving AnimationSet animSet = new AnimationSet(true); animSet.setFillEnabled(true); animSet.addAnimation(scale); animSet.addAnimation(slideUp); // Launching animation set logo.startAnimation(animSet);
ImageView myImageView = (ImageView)findViewById(R.id.my_imageview); AnimationSet animSet = new AnimationSet(true); animSet.setInterpolator(new DecelerateInterpolator()); animSet.setFillAfter(true); animSet.setFillEnabled(true); final RotateAnimation animRotate = new RotateAnimation(0.0f, -90.0f, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f); animRotate.setDuration(1500); animRotate.setFillAfter(true); animSet.addAnimation(animRotate); myImageView.startAnimation(animSet);
TranslateAnimation translateAnim = new TranslateAnimation(0, desX, 0, desY); ScaleAnimation scaleAnim = new ScaleAnimation(1, 0.2f, 1, 1Animation.RELATIVE_TO_SELF, 0.5f,Animation.RELATIVE_TO_SELF, 0.5f); AnimationSet set = new AnimationSet(false); set.addAnimation(translateAnim); set.addAnimation(scaleAnim); set.setFillEnabled(true); set.setFillAfter(true); set.setDuration(300); mView.startAnimation(set);
animSet.setFillEnabled(true); animSet.addAnimation(scale); animSet.addAnimation(translate);
set.setFillEnabled(true); splashImage.startAnimation(set);
AnimationSet as = new AnimationSet(true); as.setFillEnabled(true); as.setInterpolator(new BounceInterpolator()); as.addAnimation(firstAnim); as.addAnimation(secondAnim); as.setDuration(1000); imageView.startAnimation(as);
{ Animation scaleYAnim = AnimationUtils.loadAnimation(context, R.anim.fill_y); Animation scaleXAnim = AnimationUtils.loadAnimation(context, R.anim.fill_x); AnimationSet scaleAnim = new AnimationSet(false); scaleAnim.addAnimation(scaleXAnim); scaleAnim.addAnimation(scaleYAnim); scaleAnim.setFillEnabled(true); scaleAnim.setFillAfter(true); onsite_background.startAnimation(scaleAnim); scaleAnim.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation arg0) { onsite_background.setVisibility(View.VISIBLE); } @Override public void onAnimationRepeat(Animation arg0) { } @Override public void onAnimationEnd(Animation arg0) { Log.v("onAnimationEnd", "scaleAnim"); mSignOuthButton.setTextColor(Color.WHITE); } }); }
mShowFolderAnimSet.setDuration(100); mShowFolderAnimSet.setFillAfter(true); mShowFolderAnimSet.setFillEnabled(true); mHideFolderAnimSet.setDuration(100); mHideFolderAnimSet.setFillAfter(true); mHideFolderAnimSet.setFillEnabled(true);
animationSet.setFillAfter(false); animationSet.setFillBefore(true); animationSet.setFillEnabled(true);
animationSet.setFillAfter(false); animationSet.setFillBefore(true); animationSet.setFillEnabled(true);