1

我需要在 ImageView 和该 Image 的 onClick 上显示一个 Image ,我想在该 imageView 上显示另一个图像,仅带有一些类似于 Cube 的过渡动画,如下图所示,带有 "onTouch" 。

图片

我一直在此站点上搜索一些示例,这些示例都是针对活动的。我需要为 ImageView 实现它。

目前我正在使用一些带有两个图像的 ViewFlipper 并尝试实现它,

<ViewFlipper android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/a"
    android:layout_weight="1">

    <ImageView 
        android:contentDescription="@string/action_settings"
    android:id="@+id/alphaA"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/a"/>

    <ImageView 
        android:contentDescription="@string/action_settings"
    android:id="@+id/imgA"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/small_aeroplane1"/>
</ViewFlipper>
   ..........

到目前为止,我有 4 个 View Flippers。

我需要知道,如何为上述情况添加立方体过渡。或者有没有更好的方法在只有两个图像之间实现 CUBE TRANSITION

4

2 回答 2

1

我认为这两个链接将对您未来的项目有所帮助。

1) https://code.google.com/p/transitionviewpager/source/browse/

2) https://github.com/jfeinstein10/JazzyViewPager

于 2014-09-02T10:20:49.457 回答
0

你必须使用 ViewPager,

检查https://github.com/jfeinstein10/JazzyViewPager

或者这里是一个带有 3D 立方体动画的现成 ViewPager 类 https://github.com/inovex/ViewPager3D/blob/master/src/de/inovex/android/widgets/ViewPager3D.java

于 2013-08-26T10:18:53.083 回答