Back to project page AndroidImageSlider.
The source code is released under:
MIT License
If you think the Android project AndroidImageSlider listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.daimajia.slider.library.Transformers; /*from w ww.j a v a 2s. c o m*/ import android.view.View; import com.nineoldandroids.view.ViewHelper; public class ZoomInTransformer extends BaseTransformer { @Override protected void onTransform(View view, float position) { final float scale = position < 0 ? position + 1f : Math.abs(1f - position); ViewHelper.setScaleX(view,scale); ViewHelper.setScaleY(view,scale); ViewHelper.setPivotX(view,view.getWidth() * 0.5f); ViewHelper.setPivotY(view,view.getHeight() * 0.5f); ViewHelper.setAlpha(view,position < -1f || position > 1f ? 0f : 1f - (scale - 1f)); } }