[英]how to rotate imageview from its centre position using object animation
这样工作正常,但是当图像移动时我也想移动其他图像
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="86dp"
android:src="@drawable/top_pati" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageView1"
android:layout_below="@+id/imageView1"
android:src="@drawable/top_pativertical" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/imageView1"
android:layout_below="@+id/imageView1"
android:src="@drawable/top_pativertical" />
尝试使用以下代码进行对象动画处理:
ObjectAnimator anim = ObjectAnimator.ofFloat(tvBorder, View.ROTATION, 60);
anim.setRepeatMode(ValueAnimator.REVERSE);
anim.start();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.