I am changing the left margin of an image view in the following manner :
ViewGroup.MarginLayoutParams layoutParams =
You can use the following
image.animate().setDuration(durationIn).translationXBy(offsetFloat).start();
You can also add .setInterpolator(new BounceInterpolator()) to change the look of the animation.
.setInterpolator(new BounceInterpolator())