CardView flip animation
<p>I have seen examples of 'card flip animations' where the entire layout of an activity is changed using the animation, much like the <a href="http://developer.android.com/intl/zh-cn/training/animation/cardflip.html" rel="nofollow">developer docs here</a>.</p>

<p>Is there a way I can have a similar kind of animation but only on one view?</p>

<p>Specifically, I have a <code>ViewFlipper</code> which contains two <code>CardView</code>s. When I flip the views, I would like there to be a flipping animation.</p>

<p>Currently I have sliding animations, but here is what I have so far:</p>

<pre><code>private void showPrevious() {
    // If there aren't any other children, stop.
    if (mViewFlipper.getDisplayedChild() == 0) {
        return;
    }

    // Next screen comes in from left.
    mViewFlipper.setInAnimation(this, R.anim.slide_in_from_left);
    // Current screen goes out from right.
    mViewFlipper.setOutAnimation(this, R.anim.slide_out_to_right);

    // Display next screen.
    mViewFlipper.showNext();
}

private void showNext() {
    // If there is a child (to the left), stop.
    if (mViewFlipper.getDisplayedChild() == 1) {
        return;
    }

    // Next screen comes in from right.
    mViewFlipper.setInAnimation(this, R.anim.slide_in_from_right);
    // Current screen goes out from left.
    mViewFlipper.setOutAnimation(this, R.anim.slide_out_to_left);

    // Display previous screen.
    mViewFlipper.showPrevious();
}
</code></pre>

<p>Could the slide animations I have be replaced with a flip animation (where it appears as though the CardView is rotated in 3D)?</p>