private float getDegreesFlipped() {
        float localFlipDistance = mFlipDistance % FLIP_DISTANCE_PER_PAGE;

        // fix for negative modulo. always want a positive flip degree
        if (localFlipDistance < 0) {
            localFlipDistance += FLIP_DISTANCE_PER_PAGE;
        }

        return (localFlipDistance / FLIP_DISTANCE_PER_PAGE) * 180;
    }
Enable a hardware layer for the view.

@param v
@param drawWithLayer
app/src/main/java/home/smart/fly/animations/customview/flipview/FlipView.java