Search code examples
androidanimationnineoldandroids

flipping a tile in android


In my layout, I am having a set of tiles(Something similar to windows phone home screen) .I am trying to flip the tile to show more content. I have taken a look at card flipping, but then it flips the entire fragment.I want it to flip a part of the whole layout.I have tried rotating it using Object animator .Here is my code..

View v = findViewById(R.id.iotd_relative);
            ObjectAnimator animation = ObjectAnimator.ofFloat(v, "rotationY", 0.0f, 360f);
            animation.setDuration(3600);
            animation.setRepeatCount(ObjectAnimator.INFINITE);
            animation.setInterpolator(new AccelerateDecelerateInterpolator());
            animation.start();

Is there any possibility of calling another layout when it flips?


Solution

  • I would recommend using a ScaleAnimation, heres a good example that simulates a Card Flip, you should be able to get what you want from there.

    Use Android's scale animation to simulate a 3D flip...