【问题标题】:Android- Flip horizontal animation between two imagesAndroid-在两个图像之间翻转水平动画
【发布时间】:2012-03-20 03:59:06
【问题描述】:

我正在尝试创建两个图像的动画。我想要图像,单击时,它会像卡片一样水平翻转 180 度到新图像(从前到后)。我想在布局上使用多个图像执行此操作。如何编写一次此代码并在需要执行时调用它?

【问题讨论】:

    标签: android android-layout animation viewflipper


    【解决方案1】:
    In Resource->Create anim folder->xml file with any name
    
    
    
         <set xmlns:android="http://schemas.android.com/apk/res/android"
        android:shareInterpolator="false">
      <scale
                android:fromXScale=".3"
                android:toXScale="1.0"
                android:fromYScale="0.3"
                android:toYScale="1.0"
                android:pivotX="50%"
                android:pivotY="50%"
                android:duration="800" />
    
            <rotate
                android:fromDegrees="0"
                android:toDegrees="180"
    
                android:pivotX="50%"
                android:pivotY="50%"
                android:duration="800" />
    
    </set>
    

    现在您可以在任何地方使用此动画,而且次数也不多

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-28
      • 2016-10-20
      • 1970-01-01
      • 2021-05-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多