标签:
1.插入 Java代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | public class ZoomOutTranformer extends ABaseTransformer { @Override protected void onTransform(View view, float position) { final float scale = 1f + Math.abs(position); view.setScaleX(scale); view.setScaleY(scale); view.setPivotX(view.getWidth() * 0 .5f); view.setPivotY(view.getHeight() * 0 .5f); view.setAlpha(position < -1f || position > 1f ? 0f : 1f - (scale - 1f)); if (position == - 1 ){ view.setTranslationX(view.getWidth() * - 1 ); } } } |
2.
3.
标签:
原文地址:http://www.cnblogs.com/yutianran/p/5045770.html