Code example for View

Methods: getMeasuredHeight, getMeasuredWidth

0
        mChildrenTransformsAnimator.start();
    } 
 
    private void getTransformForPage(int screenCenter, int index, float[] transform) {
        View child = getChildAt(index);
        float boundedProgress = getBoundedScrollProgress(screenCenter, child, index);
        float rotationY = - mAdjacentPagesAngle * boundedProgress;
        int width = child.getMeasuredWidth();
        float pivotX = (width / 2f) + boundedProgress * (width / 2f);
        float pivotY = child.getMeasuredHeight() / 2;
 
        transform[0] = pivotX;
        transform[1] = pivotY;
        transform[2] = rotationY;
    } 
 
    Interpolator mFastFadeInterpolator = new Interpolator() {
        Interpolator mInternal = new DecelerateInterpolator(1.5f); 
        float mFactor = 2.5f; 
        @Override 
        public float getInterpolation(float input) {