@Override protected void applyTransformation(float interpolatedTime, Transformation t) { View view = mView.get(); if (view != null) { t.setAlpha(mAlpha); transformMatrix(t.getMatrix(), view); } } }
@Override protected void applyTransformation(float interpolatedTime, Transformation t) { View view = mView.get(); if (view != null) { t.setAlpha(mAlpha); transformMatrix(t.getMatrix(), view); } } }
t.setAlpha(mAlpha);
protected void applyTransformation(float interpolatedTime, Transformation t) { final float alpha = mFromAlpha; t.setAlpha(alpha + ((mToAlpha - alpha) * interpolatedTime));
@Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setAlpha(child == mSelectedChild ? 1.0f : mUnselectedAlpha); return true; }
@Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setAlpha(child == mSelectedChild ? 1.0f : mUnselectedAlpha); return true; }
@Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setAlpha(child == mSelectedChild ? 1.0f : mUnselectedAlpha); return true; }
@Override protected void applyTransformation(float interpolatedTime, Transformation t) { View view = mView.get(); if (view != null) { t.setAlpha(mAlpha); transformMatrix(t.getMatrix(), view); } } }
@Override protected void applyTransformation(float interpolatedTime, Transformation t) { View view = mView.get(); if (view != null) { t.setAlpha(mAlpha); transformMatrix(t.getMatrix(), view); } } }
@Override protected void applyTransformation(float interpolatedTime, Transformation t) { View view = mView.get(); if (view != null) { t.setAlpha(mAlpha); transformMatrix(t.getMatrix(), view); } }
@Override protected void applyTransformation(float interpolatedTime, Transformation t) { View view = mView.get(); if (view != null) { t.setAlpha(mAlpha); transformMatrix(t.getMatrix(), view); } }
@Override protected void applyTransformation(float interpolatedTime, Transformation t) { View view = mView.get(); if (view != null) { t.setAlpha(mAlpha); transformMatrix(t.getMatrix(), view); } } }
/** * Signal to this animation that a layout pass has caused the View on which this animation is * running to have its "top" coordinate changed. * * @param change * the difference in pixels */ public void changeYOffset(int change) { fromY -= change; toY -= change; } @Override protected void applyTransformation(float interpolatedTime, Transformation t) { float reverseTime = 1f - interpolatedTime; float dy = (interpolatedTime * toY) + (reverseTime * fromY); float alpha = (interpolatedTime * toAlpha) + (reverseTime * fromAlpha); if (alpha > 1f) { alpha = 1f; } else if (alpha < 0f) { alpha = 0f; } t.setAlpha(alpha); t.getMatrix().setTranslate(0f, dy); }
@Override protected void applyTransformation(float factor, Transformation transformation) { Matrix matrix = transformation.getMatrix(); mPm.getMatrix(mDistance * factor, matrix, PathMeasure.POSITION_MATRIX_FLAG); mView.setRotation(mRotation * factor); float scale = 1F; if (3000.0F * factor < 200.0F) { scale = scale(factor, 0.0D, 0.06666667014360428D, 0.20000000298023224D, 1.100000023841858D); } else if (3000.0F * factor < 300.0F) { scale = scale(factor, 0.06666667014360428D, 0.10000000149011612D, 1.100000023841858D, 1.0D); } mView.setScaleX(scale); mView.setScaleY(scale); transformation.setAlpha(1.0F - factor); } }
@Override protected void applyTransformation(float factor, Transformation transformation) { Matrix matrix = transformation.getMatrix(); mPm.getMatrix(mDistance * factor, matrix, PathMeasure.POSITION_MATRIX_FLAG); mView.setRotation(mRotation * factor); float scale = 1F; if (3000.0F * factor < 200.0F) { scale = scale(factor, 0.0D, 0.06666667014360428D, 0.20000000298023224D, 1.100000023841858D); } else if (3000.0F * factor < 300.0F) { scale = scale(factor, 0.06666667014360428D, 0.10000000149011612D, 1.100000023841858D, 1.0D); } mView.setScaleX(scale); mView.setScaleY(scale); transformation.setAlpha(1.0F - factor); } }
@Override protected void applyTransformation(float factor, Transformation transformation) { Matrix matrix = transformation.getMatrix(); mPm.getMatrix(mDistance * factor, matrix, PathMeasure.POSITION_MATRIX_FLAG); mView.setRotation(mRotation * factor); float scale = 1F; if (3000.0F * factor < 200.0F) { scale = scale(factor, 0.0D, 0.06666667014360428D, 0.20000000298023224D, 1.100000023841858D); } else if (3000.0F * factor < 300.0F) { scale = scale(factor, 0.06666667014360428D, 0.10000000149011612D, 1.100000023841858D, 1.0D); } mView.setScaleX(scale); mView.setScaleY(scale); transformation.setAlpha(1.0F - factor); } }
@Override protected void applyTransformation(float factor, Transformation transformation) { Matrix matrix = transformation.getMatrix(); mPm.getMatrix(mDistance * factor, matrix, PathMeasure.POSITION_MATRIX_FLAG); mView.setRotation(mRotation * factor); float scale = 1F; if (3000.0F * factor < 200.0F) { scale = scale(factor, 0.0D, 0.06666667014360428D, 0.20000000298023224D, 1.100000023841858D); } else if (3000.0F * factor < 300.0F) { scale = scale(factor, 0.06666667014360428D, 0.10000000149011612D, 1.100000023841858D, 1.0D); } mView.setScaleX(scale); mView.setScaleY(scale); transformation.setAlpha(1.0F - factor); } }
@Override protected void applyTransformation(float factor, Transformation transformation) { Matrix matrix = transformation.getMatrix(); mPm.getMatrix(mDistance * factor, matrix, PathMeasure.POSITION_MATRIX_FLAG); mView.setRotation(mRotation * factor); float scale = 1F; //scale = scale(factor, 0.0D, 0.06666667014360428D, 0.20000000298023224D, 1.100000023841858D); if (3000.0F * factor < 200.0F) { scale = scale(factor, 0.0D, 0.06666667014360428D, 0.20000000298023224D, 1.100000023841858D); } else if (3000.0F * factor < 300.0F) { scale = scale(factor, 0.06666667014360428D, 0.10000000149011612D, 1.100000023841858D, 1.0D); } mView.setScaleX(scale); mView.setScaleY(scale); transformation.setAlpha(1.0F - factor); } }
t.setAlpha(alphaAmount);