with animated images, replace the code from OnCreat function to setOnClickListener function
<p>I am attempting to animate images, and this my code in xml file</p>

<pre><code>&lt;animation-list xmlns:android="http://schemas.android.com/apk/res/android" 
android:oneshot="false" &gt;
&lt;item android:drawable="@drawable/father11" android:duration="200" /&gt;
&lt;item android:drawable="@drawable/father22" android:duration="200" /&gt;
&lt;item android:drawable="@drawable/father33" android:duration="200" /&gt;
&lt;item android:drawable="@drawable/father44" android:duration="200" /&gt;
&lt;item android:drawable="@drawable/father55" android:duration="200" /&gt;
&lt;/animation-list&gt;
</code></pre>

<p>but in my application i have to run the animated images when the button clicked but i got sentax error</p>

<pre><code>btn_father.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            // TODO Auto-generated method stub
             SignImage = (ImageView) findViewById(R.id.Sign);
             SignImage.setImageResource(R.drawable.fatherr);
             lightsAnimation=(AnimationDrawable) SignImage.getDrawable();

            }
        public void onWindowFocusChanged(boolean hasFocus) {
              super.onWindowFocusChanged(hasFocus);
              lightsAnimation.start();

            }


    });
</code></pre>

<p>I read this sentece in the link but did not understand it "(if could easily have been started with a Button or other type of input). Replace the main class in the main.java file in the src tree with this class"</p>
