我在绝对布局中制作了一些Imagebuttons,然后用它所有的按钮旋转整个布局,现在我有一个问题,即图像按钮的操作不起作用,可能是因为操作不与的ImageButtonImageButton操作不起作用
请,如果有人知道发生了什么事让我知道
main.xml中
<AbsoluteLayout
android:id="@+id/wheelLayout"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_x="-250px" android:clickable="true">
<ImageView
android:id="@+id/wheelBG"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/wheel"/>
<ImageButton
android:id="@+id/accounts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="258dp"
android:layout_y="222dp"
android:background="@null"
android:onClick="accountsOnClick"
android:src="@drawable/accounts"/>
<ImageButton
android:id="@+id/cards"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="228dp"
android:layout_y="291dp"
android:background="@null"
android:onClick="cardsOnClick"
android:src="@drawable/cards"/>
</AbsoluteLayout>
然后我已经做了功能来旋转在一个特定的持续时间
使用RotateAnimation以及角度全绝对布局和我已经定义的按钮
公共无效accountsOnClick(查看视图的动作){ System.out.println(“imageButton1OnClick”); }
循环之前的动作是运作良好,但旋转后的动作不工作
请上传你的代码 – Altaaf 2012-02-16 08:30:56
好吧,你的代码有些奇怪,不是吗? – waqaslam 2012-02-16 08:32:57
仅供参考,AbsoluteLayout **已弃用** – 2012-02-16 08:43:39