List of usage examples for android.view View startAnimation
public void startAnimation(Animation animation)
From source file:com.chromium.fontinstaller.util.ViewUtils.java
public static void animGrowFromCenter(View view, Context context) { if (context == null || view == null) return;//www . j ava 2 s . c o m view.startAnimation(AnimationUtils.loadAnimation(context, R.anim.grow_from_center)); }
From source file:com.chromium.fontinstaller.util.ViewUtils.java
public static void animShrinkToCenter(View view, Context context) { if (context == null || view == null) return;/* www. j a va 2 s. co m*/ view.startAnimation(AnimationUtils.loadAnimation(context, R.anim.shrink_to_center)); }
From source file:com.chromium.fontinstaller.util.ViewUtils.java
public static void animSlideInBottom(View view, Context context) { if (context == null || view == null) return;/* www. j a v a2 s .co m*/ view.startAnimation(AnimationUtils.loadAnimation(context, R.anim.abc_slide_in_bottom)); }
From source file:com.chromium.fontinstaller.util.ViewUtils.java
public static void animSlideUp(View view, Context context) { if (context == null || view == null) return;//from w w w .ja v a 2 s .c o m view.startAnimation(AnimationUtils.loadAnimation(context, R.anim.abc_slide_out_top)); }
From source file:Main.java
public static void updateAnimation(final View v) { final ScaleAnimation scaleInAnimation = new ScaleAnimation(v.getX(), v.getX() + 1, v.getY(), v.getY() + 1, v.getPivotX(), v.getPivotY()); scaleInAnimation.setDuration(200);/*from w ww.jav a 2s . com*/ scaleInAnimation.setFillAfter(false); v.startAnimation(scaleInAnimation); }
From source file:org.wheelmap.android.utils.ViewTool.java
public static void setAlphaForView(View alphaView, float alpha) { AlphaAnimation animation = new AlphaAnimation(alpha, alpha); animation.setDuration(0);/* www .j a va2 s . c o m*/ animation.setFillAfter(true); alphaView.startAnimation(animation); }
From source file:Main.java
/** * Apply the specified animation to the view. * * @param context the context//from w w w . j a va2 s .c o m * @param v the view to apply the animation to * @param animationResource the animation resource to apply * @param listener the animation listener to attach to the animation */ public static void applyViewAnimation(Context context, View v, int animationResource, Animation.AnimationListener listener) { Animation animation = android.view.animation.AnimationUtils.loadAnimation(context, animationResource); animation.setAnimationListener(listener); v.startAnimation(animation); }
From source file:Main.java
public static void fadeIn(final View view, AnimationListener animationListener, int duration) { Animation alphaAnimation = new AlphaAnimation(1.0f, 0.0f); alphaAnimation.setDuration(duration); alphaAnimation.setAnimationListener(animationListener); view.startAnimation(alphaAnimation); }
From source file:Main.java
public static void startAnimation(View target, int aniResId, int duration) { if (target == null) return;/* w ww . j av a2 s. c om*/ Animation animation = AnimationUtils.loadAnimation(target.getContext(), aniResId); if (animation != null) { animation.setDuration(duration); target.startAnimation(animation); } }
From source file:Main.java
public static void rotate0to180(View view) { RotateAnimation rotate = new RotateAnimation(0, 180, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); rotate.setDuration(ANIM);/*from w w w . j a v a2s.co m*/ rotate.setInterpolator(new LinearInterpolator()); rotate.setFillAfter(true); view.startAnimation(rotate); }