Back to project page MovingImageView.
The source code is released under:
Apache License
If you think the Android project MovingImageView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.grobas.movingimageview.sample; //from w w w. j a v a 2 s.c o m import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.View; import android.view.animation.BounceInterpolator; import net.grobas.view.MovingImageView; public class SampleActivity extends ActionBarActivity { MovingImageView image; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sample); image = (MovingImageView) findViewById(R.id.image); } public void action(View v){ //image.getMovingAnimator().setInterpolator(new BounceInterpolator()); image.getMovingAnimator().setSpeed(100); image.getMovingAnimator().addCustomMovement().addDiagonalMoveToDownRight().addHorizontalMoveToLeft().addDiagonalMoveToUpRight() .addVerticalMoveToDown().addHorizontalMoveToLeft().addVerticalMoveToUp().start(); } }