Activity
private Handler mHandler;
private long mInterval = 1000;
private View mLeftfoot;
private Animation mFootAnim;
public void onCreate(Bundle bundle) {
...
mHandler = new Handler(); //.os package class when importing
mLeftfoot = findViewById(R.id.leftfoot);
mFootAnim = AnimationUtils.loadAnimation(this, R.anim.foot);
stepRecursive();
}
private void stepRecursive() {
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
mLeftFoot.startAnimation(mFootAnim );
stepRecursive();
}
}, mInterval);
}
/res/anim/foot.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="0" android:toYDelta="-15" android:duration="400"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0" android:duration="400" />
</set>
Thats straight off the top of my head (thus untested) but should be plenty to get you going in the right direction