解决方案 »

  1.   

    怎么改变坐标,我不会,你能给个demo吗?
      

  2.   

    public class MainActivity extends Activity { @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    final ImageView imageView = (ImageView) findViewById(R.id.imageView);
    final Animation animation = AnimationUtils.loadAnimation(this, R.anim.translate_anim);
    imageView.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
    imageView.startAnimation(animation);
    }
    });
    }

    }
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
    <ImageView 
        android:id="@+id/imageView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/demo"/>
    </LinearLayout>
    <?xml version="1.0" encoding="utf-8"?>
    <translate
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:fromXDelta="-100%p"
        android:toXDelta="100%p"
        android:fromYDelta="0%p"
        android:toYDelta="0"
        android:duration="5000">
    </translate>
      

  3.   

    简单写了一个Demo,你粘贴上去试一下。
      

  4.   

    HorizontalScrollView.smoothScrollTo();
    就可以搞定了