Default [Q]Making flip animation in section pageadapter

I am trying to make a flip animation in section page adapter via following code but it doesnt works perfectly according to my expectations.
I want to make animation exact like launchers have

Code:
Select Code
 mViewPager = (ViewPager) findViewById(R.id.pager);

mViewPager . setPageTransformer(true , new FlippY());
Animation class
Code:
Select Code
 
public class FlippY implements ViewPager. PageTransformer {
public void transformPage ( View view , float position ) {
int pageWidth = view.getWidth();
if ( position<-1){ 
view.setAlpha(0);
} else if ( position<= 0) { 
view.setAlpha(1);

view.setRotationY(Math.round(180*position));
view . setScaleX(1);
view . setScaleY(1);
}
 else if (position<=1) { 
view.setAlpha (1-position);


view.setRotationY(Math.round(180*position));

view.setScaleX(1);
view.setScaleY(1);
} else { 
view.setAlpha(0);
}
}
}
So please suggest me modifications for this class so that animation looks perfect

Sent from my GT-S5570 using XDA Premium 4 mobile app