我的 main.xml 看起来像这样:
<AbsoluteLayout
android:id="@+id/AbsoluteLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView
android:layout_height="wrap_content"
android:layout_x="247dip"
android:layout_width="wrap_content"
android:layout_y="96dip"
android:id="@+id/Ball"
android:src="@drawable/ball"/>
</AbsoluteLayout>
和Java
ball = (ImageView) findViewById(R.id.Ball);
x=247dip, y=96dip
如果我想x=100, y=100
在我的应用程序运行时将球从另一个方向移动,我该怎么办?