Note that there are some explanatory texts on larger screens.

plurals
  1. POonAnimationRepeat() method not working
    primarykey
    data
    text
    <p>onAnimationRepeat() method is not working. I have tested through logger that the method is not being accessed by android. What am I doing wrong ?</p> <p><strong>code</strong></p> <pre><code>public class MainActivity extends Activity { private TextView textView; String animText; private Animation fadeInAnimation; ArrayList&lt;String&gt; numList; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView = (TextView)findViewById(R.id.animationText); numList=new ArrayList&lt;String&gt;(); Random random = new Random(); int num = random.nextInt(20); for(int i = 1; i &lt;= num ; i++){ animText = String.valueOf(i); numList.add(animText); } doFadeEffectAnimation(); } public void doFadeEffectAnimation(){ textView = (TextView)findViewById(R.id.animationText); textView.setTextSize(50); fadeInAnimation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_in); fadeInAnimation.setAnimationListener(new AnimationListener() { @Override public void onAnimationStart(Animation animation) { // TODO Auto-generated method stub } @Override public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub for (int i = 0; i &lt; numList.size(); i++) { textView.setText(numList.get(i)); } } @Override public void onAnimationEnd(Animation animation) { // TODO Auto-generated method stub } }); textView.startAnimation(fadeInAnimation); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; } } </code></pre> <p><strong>XML</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;set xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;alpha android:duration="2000" android:fromAlpha="0.1" android:interpolator="@android:anim/accelerate_interpolator" android:toAlpha="1.0" android:repeatCount="2" /&gt; &lt;/set&gt; </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