工作后,我有一些关于它的按钮相对布局,我创建了一个旋转动画,旋转它按钮动作不旋转
但是当我将其旋转按钮的操作不能正常工作,行动按钮仍然保存按钮的老大地位旋转前
可以在任何一个请帮我解决这个
<ImageButton
android:id="@+id/last20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="75dp"
android:background="@null"
android:src="@drawable/last20_selector"
android:onClick="last20OnClick"/>
super.onCreate(savedInstanceState);
setContentView(R.layout.wheel);
RelativeLayout layout = (RelativeLayout) findViewById(R.id.wheelLayout);
RotateAnimation rotateAnim = new RotateAnimation(0, 45,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
0.5f);
rotateAnim.setDuration(1000);
rotateAnim.setRepeatCount(0);
rotateAnim.setFillAfter(true);
layout.startAnimation(rotateAnim);
}
public void last20OnClick(View view) {
System.out.println("last20OnClick");
}
你必须分享一些代码...... – 2012-03-03 21:08:53
你找到了解决办法吗?面对同样的问题。 – Beena 2014-11-27 05:07:49
不,我没有找到解决方案,并使用画布构建我的控件并停止使用绝对布局。 – 2014-12-01 08:27:16