Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Frame Animation with AnimationDrawable stops when using inside TranslateAnimation
    primarykey
    data
    text
    <p>To all,</p> <p>I have animated image with Frame animations that I'm moving from up behind a view and onto the screen. When the TranslateAnimation is done I want to keep the finish position so setFillAfter is set to true.</p> <p>My issue is that the Frame Animation is stopped when the TranslateAnimation is finished. How can I restart or keep the Frame Animation going?</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;animation-list xmlns:android="http://schemas.android.com/apk/res/android" id="selected" android:oneshot="false"&gt; &lt;item android:drawable="@drawable/a" android:duration="200" /&gt; &lt;item android:drawable="@drawable/b" android:duration="200" /&gt; &lt;item android:drawable="@drawable/c" android:duration="200" /&gt; &lt;/animation-list&gt; loadingView = (RelativeLayout) findViewById(R.id.loadingBar); loadingView.setVisibility(View.VISIBLE); loadingImage = (ImageView) loadingView.findViewById(R.id.loading); loadingImage.setBackgroundResource(R.drawable.loading); animateImages = (AnimationDrawable) loadingImage.getBackground(); translateAnimation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,0.0f, Animation.RELATIVE_TO_SELF, -1.0f); translateAnimation.setInterpolator(new AccelerateInterpolator()); translateAnimation.setDuration(2000); translateAnimation.setFillEnabled(true); translateAnimation.setFillAfter(true); translateAnimation.setAnimationListener(new AnimationListener() { @Override public void onAnimationStart(Animation animation) { // TODO Auto-generated method stub animateImages.start(); } @Override public void onAnimationEnd(Animation arg0) { } @Override public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } }); loadingView.startAnimation(translateAnimation); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload