List of usage examples for android.view.animation TranslateAnimation setDuration
public void setDuration(long durationMillis)
From source file:Main.java
public static void btnTranslate(View view) { TranslateAnimation ta = new TranslateAnimation(0, 200, 0, 300); ta.setDuration(1000); view.startAnimation(ta);//from w w w. j a v a 2s . c o m }
From source file:Main.java
public static void SetImageSlide(View v, int startX, int toX, int startY, int toY) { TranslateAnimation anim = new TranslateAnimation(startX, toX, startY, toY); anim.setDuration(200); anim.setFillAfter(true);// w w w .j ava2s . co m v.startAnimation(anim); }
From source file:Main.java
public static void TranslateAnimation(View v, int startX, int toX, int startY, int toY, int time) { TranslateAnimation anim = new TranslateAnimation(startX, toX, startY, toY); anim.setDuration(time); anim.setFillAfter(true);/*from w w w. j a v a 2 s. co m*/ v.startAnimation(anim); }
From source file:Main.java
public static void moveFrontBg(View v, int startX, int toX, int startY, int toY) { TranslateAnimation anim = new TranslateAnimation(startX, toX, startY, toY); anim.setDuration(250); anim.setFillAfter(true);//from w w w . j a va 2 s . c o m v.startAnimation(anim); }
From source file:Main.java
public static void setImageSlide(View v, int startX, int toX, int startY, int toY) { TranslateAnimation anim = new TranslateAnimation(startX, toX, startY, toY); anim.setDuration(100); anim.setFillAfter(true);//from w w w .j a va 2 s . co m v.startAnimation(anim); }
From source file:Main.java
public static void SetImageSlide(View view, int startX, int toX, int startY, int toY) { TranslateAnimation anim = new TranslateAnimation(startX, toX, startY, toY); anim.setDuration(100); anim.setFillAfter(true);//from ww w . ja va 2s . co m view.startAnimation(anim); }
From source file:Main.java
public static void animSlideOutFromTop(final View view) { TranslateAnimation animate = new TranslateAnimation(0, 0, 0, view.getHeight()); animate.setDuration(400); animate.setFillAfter(true);/* w ww . j a v a2 s .com*/ view.startAnimation(animate); view.setVisibility(View.GONE); }
From source file:Main.java
public static TranslateAnimation getTranslation(int fromX, int toX, int fromY, int toY, int duration, Animation.AnimationListener listener) { TranslateAnimation anim = new TranslateAnimation(fromX, toX, fromY, toY); anim.setDuration(duration); anim.setFillAfter(true);//from w w w . j a v a2 s . c om anim.setAnimationListener(listener); return anim; }
From source file:Main.java
public static void animSlideOutFromBottom(final View view) { TranslateAnimation animate = new TranslateAnimation(0, 0, 0, -view.getHeight()); animate.setDuration(500); animate.setFillAfter(true);/*from w w w .j a v a2 s . c o m*/ view.startAnimation(animate); view.setVisibility(View.GONE); }
From source file:Main.java
public static TranslateAnimation translate(int startX, int endX, int startY, int endY, int time) { TranslateAnimation translateAnimation = new TranslateAnimation(startX, endX, startY, endY); translateAnimation.setDuration(time); return translateAnimation; }