I am trying to move 3 buttons relative to their starting points:
The code for starting the animation is:
protected void showMoreBtns() {
Button btn1 = (Button)this.findViewById( R.id.more1btn );
Button btn2 = (Button)this.findViewById( R.id.more2btn );
Button btn3 = (Button)this.findViewById( R.id.more3btn );
Animation showMore = AnimationUtils.loadAnimation( this, R.anim.optionsinup1 );
btn1.startAnimation( showMore );
showMore = AnimationUtils.loadAnimation( this, R.anim.optionsinup2 );
btn2.startAnimation( showMore );
showMore = AnimationUtils.loadAnimation( this, R.anim.optioninup3 );
btn3.startAnimation( showMore );
}
And the animation is defined as:
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:fromXDelta="0"
android:fromYDelta="0"
android:toXDelta="-60"
android:toYDelta="-30" />
</set>
All three animations follow the same format, with only the android:toDelta
's being modified.
The issues is the animation runs, yet the buttons return to their original position at the end of the animation. I would like them to stay at the end point.