WEB开发网
开发学院手机开发Android 开发 浅谈 Android 3D旋转 阅读

浅谈 Android 3D旋转

 2010-08-23 01:27:00 来源:WEB开发网   
核心提示:0.0f, 0.0f, mCenterX, mCenterY); 4 5 leftAnimation.setFillAfter(true); 6 leftAnimation.setDuration(1000); 7 rightAnimation.setFillAfter(true); 8 rightAnimation.
0.0f, 0.0f, mCenterX, mCenterY); 4 5 leftAnimation.setFillAfter(true); 6 leftAnimation.setDuration(1000); 7 rightAnimation.setFillAfter(true); 8 rightAnimation.setDuration(1000); 9 10 mImageView1.startAnimation(leftAnimation); 11 mImageView2.startAnimation(rightAnimation); 12

最后就是还要写一下mImageView1,mImageView2的xml,

1 < ?xml version="1.0" encoding="utf-8"?> 2 < LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:orientation="vertical" 4 android:layout_width="fill_parent" 5 android:layout_height="wrap_content" 6 > 7 8 < FrameLayout 9 android:layout_width="fill_parent" 10 android:layout_height="fill_parent"> 11 12 < ImageView 13 android:id="@+id/image1" 14 android:layout_gravity="center_horizontal" 15 android:layout_width="fill_parent" 16 android:layout_height="wrap_content" 17 android:src="@drawable/image1" 18 /> 19 < ImageView 20 android:id="@+id/image2" 21 android:background="#ffff0000" 22 android:layout_gravity="center_horizontal" 23 android:layout_width="fill_parent" 24 android:layout_height="wrap_content" 25 android:src="@drawable/image2" 26 /> 27 28 < /FrameLayout> 29 < /LinearLayout>

上一页  1 2 3 

Tags:Android 旋转

编辑录入:coldstar [复制链接] [打 印]
赞助商链接