Maybe this could be of help to you:
Animate between Views
Это дает общий пример, возможно, вы можете настроить его, чтобы получить эффект флип, который вы хотите.
<Сильный> Update:
That tutorial also gives links to various Animation docs. From that, I think you can use Rotate Animation to create the flip effect. You can give the angle of rotation and the pivot about which to rotate the view.
Понятие состоит в том, что вы поворачиваете один вид out и поворачиваете в другое представление.
<Сильный> Update:
View Flipper - это реализация анимации между представлениями. Вышеупомянутый метод, который я опубликовал, был общим, вы можете играть со значениями и создавать анимации с вами, имея гораздо более тонкий контроль. Вы можете создавать переходы между представлениями, которые другие, возможно, никогда не пробовали.
Шаги для просмотра Flipper:
1. In View Flipper, you define a Flipper element in your Layout xml file. To this flipper element, you add two child elements, which could simply be two Views OR two Layouts OR one View and one Layout. The View Flipper flips between these two Views you have defined.
2. Once you have created this much in XML, you then create four animation rules under /res/anim
for the following types of entry and exit transitions:
a. Left In
b. Left Out
c. Right In
d. Right Out
3. After 1 and 2, you now add Touch or Gesture listeners in your code, to listen for Touch and Listen events. Inside these listeners, you then initiate the animation using vf.setInAnimation()
or vf.setOutAnimation()
, where vf
is your ViewFlipper instance.
Здесь вы можете найти полный код:
1. View Flipper Tutorial 1
2. View Flipper Tutorial 2
<Сильный> Update:
A few tweaks have to be made to make View Flipper work with ListView. I found this other SO question where the same problem was solved with a minor edit. Check it out here.