tags:

views:

58

answers:

1

my main.xml look like this:

<AbsoluteLayout
   android:id="@+id/AbsoluteLayout01"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   xmlns:android="http://schemas.android.com/apk/res/android"&gt; 

   <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>

And Java

ball = (ImageView) findViewById(R.id.Ball);

How do I do if I whant to move the ball from x=247dip y=96dip to x=100 and y=100 while my app is running?

A: 

First set Image's Layout Height and width to Fillparent then use below code

public void onWindowFocusChanged(boolean hasFocus) {

        ball.scrollTo(10, 20);
    }
Maneesh
that doesn't work
Dr.Dredel