I have repeatCount set to INFINITE (-1) and repeatMode set to RESTART (1)
http://developer.android.com/reference/android/view/animation/Animation.html#INFINITE
Although my animation works, it does not repeat properly. What is missing in my code?
public class SyncActivity extends Activity { Animation slideanim; ImageView senoide; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_sync); senoide = (ImageView) findViewById(R.id.imageView3); slideanim = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.move);
move.xml
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> <translate android:fromXDelta="0%" android:toXDelta="-18.5%" android:fromYDelta="0%" android:toYDelta="0%" android:duration="1000"/> </set>
source share