Back to project page Swipe-Tabs.
The source code is released under:
MIT License
If you think the Android project Swipe-Tabs 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 it.bellotti.android.swipetabs.transforms; //from w ww .j a v a 2 s.c o m import android.view.View; /** * Created with IntelliJ IDEA. * User: SimoneBellotti * Date: 24/11/2014 * Time: 13.12 */ public class ZoomInPageTransformer extends BaseTransformer { @Override protected void onTransform(View view, float position) { final float scale = position < 0 ? position + 1f : Math.abs(1f - 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)); } }