There are several alternatives for doing this. The simplest one is probably to use a ViewPropertyAnimator
, e.g.
view.animate().translationY(value);
To get the current value (for example if you want to update it with a fixed offset) you can use view.getTranslationY()
.
See http://developer.android.com/guide/topics/graphics/prop-animation.html