List of usage examples for android.animation PropertyValuesHolder ofFloat
public static PropertyValuesHolder ofFloat(Property<?, Float> property, float... values)
From source file:Main.java
public static PropertyValuesHolder scale(float... values) { return PropertyValuesHolder.ofFloat(SCALE, values); }
From source file:Main.java
public static PropertyValuesHolder scaleY(float... values) { return PropertyValuesHolder.ofFloat(SCALE_Y, values); }
From source file:Main.java
public static PropertyValuesHolder rotation(float... values) { return PropertyValuesHolder.ofFloat(ROTATION, values); }
From source file:Main.java
public static PropertyValuesHolder translation(float... values) { return PropertyValuesHolder.ofFloat(TRANSLATION, values); }
From source file:Main.java
public static PropertyValuesHolder translationX(float... values) { return PropertyValuesHolder.ofFloat(TRANSLATION_X, values); }
From source file:Main.java
public static PropertyValuesHolder translationY(float... values) { return PropertyValuesHolder.ofFloat(TRANSLATION_Y, values); }
From source file:Main.java
public static Animator animSlideIn(int i1, View view) { float af[] = new float[2]; af[0] = i1;/*from ww w. j a v a 2 s . c o m*/ af[1] = 0.0F; return ObjectAnimator.ofPropertyValuesHolder(view, new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("translationY", af), PropertyValuesHolder.ofFloat("alpha", new float[] { 0.3F, 1.0F }) }); }
From source file:Main.java
public static Animator animSlideOut(int i1, View view) { float af[] = new float[2]; af[0] = 0.0F;/* w w w . j av a 2s. c o m*/ af[1] = -i1; return ObjectAnimator.ofPropertyValuesHolder(view, new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("translationY", af), PropertyValuesHolder.ofFloat("alpha", new float[] { 0.7F, 0.0F }) }); }
From source file:Main.java
public static ValueAnimator getScaleAnimator(View view, float... values) { return ObjectAnimator.ofPropertyValuesHolder(view, PropertyValuesHolder.ofFloat(View.SCALE_X, values), PropertyValuesHolder.ofFloat(View.SCALE_Y, values)); }
From source file:com.github.rubensousa.floatingtoolbar.FloatingAnimatorImpl.java
@Override public void show() { super.show(); int rootWidth = getRootView().getWidth(); float endFabX; if (getFab().getLeft() > rootWidth / 2f) { endFabX = getFab().getLeft() - getFab().getWidth(); } else {/* w ww .j a va 2 s .c om*/ endFabX = getFab().getLeft() + getFab().getWidth(); } PropertyValuesHolder xProperty = PropertyValuesHolder.ofFloat(View.X, endFabX); PropertyValuesHolder yProperty = PropertyValuesHolder.ofFloat(View.Y, getFloatingToolbar().getY() * 0.95f); PropertyValuesHolder scaleXProperty = PropertyValuesHolder.ofFloat(View.SCALE_X, 0); PropertyValuesHolder scaleYProperty = PropertyValuesHolder.ofFloat(View.SCALE_Y, 0); ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder(getFab(), xProperty, yProperty, scaleXProperty, scaleYProperty); animator.setDuration(FAB_MORPH_DURATION); animator.setInterpolator(new AccelerateInterpolator()); animator.start(); ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(getFloatingToolbar(), "scaleX", 1f); objectAnimator.setDuration(CIRCULAR_REVEAL_DURATION); objectAnimator.setStartDelay(CIRCULAR_REVEAL_DELAY); objectAnimator.setInterpolator(new AccelerateDecelerateInterpolator()); objectAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { getFloatingToolbar().setVisibility(View.VISIBLE); getFab().setVisibility(View.INVISIBLE); } }); objectAnimator.start(); }