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 w w .j av a 2s .c o m import android.view.View; import com.nineoldandroids.view.ViewHelper; public class FlipHorizontalTransformer extends BaseTransformer { @Override protected void onTransform(View view, float position) { final float rotation = 180f * position; ViewHelper.setAlpha(view,rotation > 90f || rotation < -90f ? 0 : 1); ViewHelper.setPivotY(view,view.getHeight()*0.5f); ViewHelper.setPivotX(view,view.getWidth() * 0.5f); ViewHelper.setRotationY(view,rotation); } }