List of usage examples for android.view.animation Animation RELATIVE_TO_SELF
int RELATIVE_TO_SELF
To view the source code for android.view.animation Animation RELATIVE_TO_SELF.
Click Source Link
From source file:Main.java
public static Animation getLtoRAnimation() { Animation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, -1, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0); animation.setDuration(400);//from w w w. j a v a 2 s. c o m return animation; }
From source file:Main.java
public static Animation slideOutFromTop() { TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, -1.0f); animation.setDuration(300);//from ww w .jav a 2 s .c om return animation; }
From source file:Main.java
public static Animation slideOutFromBottom() { TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 1.0f); animation.setDuration(300);//w w w. j a v a 2 s . c o m return animation; }
From source file:Main.java
public static Animation hideDownAnimation() { Animation mHiddenAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f);/*from www. j av a2 s . c o m*/ mHiddenAction.setDuration(500); return mHiddenAction; }
From source file:Main.java
public static RotateAnimation getRotateAnimation() { RotateAnimation ra = new RotateAnimation(0.0f, 360.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); ra.setDuration(1000);/*from w w w. j a va 2s . c om*/ ra.setStartOffset(0); ra.setRepeatCount(Animation.INFINITE); return ra; }
From source file:Main.java
public static TranslateAnimation moveToViewBottom() { TranslateAnimation mHiddenAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f);// w w w . j a v a2 s.c om mHiddenAction.setDuration(500); return mHiddenAction; }
From source file:Main.java
public static TranslateAnimation moveToViewLocation() { TranslateAnimation mHiddenAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f);//w w w . java 2s . com mHiddenAction.setDuration(500); return mHiddenAction; }
From source file:Main.java
public static Animation getSmallerAnimation(int duration) { Animation animation = new ScaleAnimation(1.0f, 0f, 1.0f, 0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); animation.setDuration(duration);// w w w .j a v a2 s .com animation.setFillAfter(true); return animation; }
From source file:Main.java
public static void btnScaleSelf(View view) { ScaleAnimation sa = new ScaleAnimation(0, 1, 0, 1, Animation.RELATIVE_TO_SELF, 0.5F, Animation.RELATIVE_TO_SELF, 0.5F); sa.setDuration(1000);// ww w . j a v a 2 s.c o m view.startAnimation(sa); }
From source file:Main.java
public static ScaleAnimation exitScaleAnim(float toXscale, float toYscale) { return new ScaleAnimation(1.0f, toXscale, 1.0f, toYscale, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); }