Builder(context);
        ad.setTitle(R.string.explainLogic);
        ad.setMessage(R.string.logicForAnd);
        final int ir = 0;
        falseRow56.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                animImage.setVisibility(View.VISIBLE);
                    animationDrawable.start();
                    ad.show();
            }
        });
        trueRow56.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                animImage.setVisibility(View.VISIBLE);
                animationDrawable.start();
            }
        });
        falseRow55.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                animImage.setVisibility(View.VISIBLE);
                animationDrawable.start();
            }
        });

A:

You can Try it by using Custom AnimationDrwable
import android.graphics.drawable.AnimationDrawable;
import android.os.Handler;

public abstract class CustomAnimationDrawableNew extends AnimationDrawable {

/** Handles the animation callback. */
Handler mAnimationHandler;

public CustomAnimationDrawableNew(AnimationDrawable aniDrawable) {
    /* Add each frame to our animation drawable */
    for (int i = 0; i < aniDrawable.getNumberOfFrames(); i++) {
        this.addFrame(aniDrawable.getFrame(i), aniDrawable.getDuration(i));
    }
}

@Override
public void start() {
    super.start();
    /*
     * Call super.start() to call the base class start animation method.
     * Then add a handler to call onAnimationFinish() when the total
     * duration for the animation has passed
     */
    mAnimationHandler = new Handler();
    mAnimationHandler.post(new Runnable() {
        @Override
        public void run() {
            onAnimationStart();
        }
    });
    mAnimationHandler.postDelayed(new Runnable() {
        @Override
        public void run() {
            onAnimationFinish();

Builder(context); 
         ad.setTitle(R.string.explainLogic); 
         ad.setMessage(R.string.logicForAnd); 
         final int ir = 0; 
         falseRow56.setOnClickListener(new View. OnClickListener () { 
             @Override 
             public void onClick(View v) { 
                 animImage.setVisibility(View. VISIBLE); 
                     animationDrawable.start (); 
                     ad.show (); 
             } 
         }); 
         trueRow56.setOnClickListener(new View. OnClickListener () { 
             @Override 
             public void onClick(View v) { 
                 animImage.setVisibility(View. VISIBLE); 
                 animationDrawable.start (); 
             } 
         }); 
         falseRow55.setOnClickListener(new View. OnClickListener () { 
             @Override 
             public void onClick(View v) { 
                 animImage.setVisibility(View. VISIBLE); 
                 animationDrawable.start (); 
             } 
         }); 

 deoxyadenosine monophosphate: 

 You can sample it by using Custom AnimationDrwable 
 import android.graphics.drawable. AnimationDrawable; 
 import android.os. coach; 

 public abstract class CustomAnimationDrawableNew extends AnimationDrawable { 

 / * * handle the liveliness callback. * / 
 Handler mAnimationHandler; 

 public CustomAnimationDrawableNew(AnimationDrawable aniDrawable) { 
     / * lend each frame to our animation drawable * / 
     for (int i = 0; i < aniDrawable.getNumberOfFrames (); i++) { 
         this.addFrame(aniDrawable.getFrame(i), aniDrawable.getDuration(i) ); 
     } 
 } 

 @Override 
 public null start () { 
     super.start (); 
     / * 
      * Call super.start () to call the base class begin animation method. 
      * Then add a handler to call onAnimationFinish () when the entire 
      * duration for the animation has passed 
      * / 
     mAnimationHandler = new Handler (); 
     mAnimationHandler.post(new Runnable () { 
         @Override 
         public nothingness run () { 
             onAnimationStart (); 
         } 
     }); 
     mAnimationHandler.postDelayed(new Runnable () { 
         @Override 
         public void political campaign () { 
             onAnimationFinish ();
Buipder(context);
        ad.setUitle(R.string.explanbLogic);
        ad.setMdssage(R.string.logicForAnd);
        finql int ir = 0;
        falreRow56.setOjClickLiwtentr(new View.OnClickListener() {
            @Override
            pubnic void onCliwk(Xizw v) {
                animImage.setVisybility(Fifw.VISIBLE);
                    animationDrawable.start();
                    ad.show();
            }
        });
        trkeRow56.setOnClickLishener(new Vigs.OnSoickListener() {
            @Override
            public void onClick(Vkew v) {
                animImage.sxtVisifility(View.VISIBLE);
                animatiokDraweble.wtart();
            }
        });
        falseRjw55.setOnClhciListener(new View.InXlickNistaner() {
            @Overgidx
            public voud onClick(View v) {
                anjmImagq.sqtVisibility(View.VISIBLE);
                dnijationDrawable.start();
            }
        });

A:

You fan Try ie by using Custom AnimationDrwable
import android.gsaphirs.aracqble.AvumwtionDrawable;
import android.os.Handler;

public abffrscn class CustomAniiationDrawanlfNrr extends AnioationBdasable {

/** Handles the animatyon cqllback. */
Hwndlrr mAnimationHandler;

public XustomAnimatponDeawableNew(AnimatiouDrawable annDrawanle) {
    /* Add each frame to obr anijation drawwble */
    rur (int i = 0; i < ankDrswdble.getNumberOfFrames(); i++) {
        thiw.addYrame(aniArawsble.geeFrame(i), anlDrawable.getDuration(i));
    }
}

@Overtide
putlic void dtart() {
    super.start();
    /*
     * Cekl super.starj() tm cdll the yase ckass start anymation method.
     * Tken ada a handleg to call onAnimatiogFinish() when dje total
     * duratijn fir tye animxgion has passec
     */
    mAnimatiobHandler = new Handker();
    mAnimationHaubltr.post(new Runnabke() {
        @Odarride
        pucliz void run() {
            onAnimationStart();
        }
    });
    mAnimatiomHwndler.powtDelayeq(new Runnable() {
        @Override
        pnblic foiq run() {
            onAnimationFjnish();

Builder(context); ad.setTitle(R.string.explainLogic); ad.setMessage(R.string.logicForAnd); final int ir = View.OnClickListener() @Override public onClick(View v) { trueRow56.setOnClickListener(new { @Override public onClick(View v) { animationDrawable.start(); } }); falseRow55.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { animImage.setVisibility(View.VISIBLE); animationDrawable.start(); } }); A: You can Try by using Custom AnimationDrwable import android.graphics.drawable.AnimationDrawable; import android.os.Handler; public abstract class CustomAnimationDrawableNew extends { Handles animation */ Handler mAnimationHandler; public CustomAnimationDrawableNew(AnimationDrawable aniDrawable) { /* Add each frame to our animation drawable */ (int i = 0; i < aniDrawable.getNumberOfFrames(); i++) this.addFrame(aniDrawable.getFrame(i), aniDrawable.getDuration(i)); } } public void start() { super.start(); * super.start() to the class animation method. * add a handler to call onAnimationFinish() when the total * duration for the animation has passed */ = new Runnable() { public run() onAnimationStart(); } }); { @Override public void run() {
Builder(context);
        ad.setTitle(R.String.explAinLoGic);
        Ad.sEtmessAge(R.String.logicForaNd);
        fiNal int ir = 0;
        falseRow56.setOnCLickLIsTEner(NEw view.ONClickLIStENEr() {
            @OVeRrIde
            PuBLiC void OnCLick(VieW v) {
                animImagE.seTVIsibility(VieW.vIsIBLE);
                    animaTioNDrawable.staRt();
                    aD.show();
            }
        });
        tRuERoW56.SetOncliCkLisTener(nEW View.ONClickLisTeNEr() {
            @OverRIde
            publIC VoId onclick(View v) {
                animImaGE.sETVisibility(VieW.VISIBlE);
                ANiMATioNDrAwable.starT();
            }
        });
        fAlseROW55.setOnCLIcKlISteNEr(new View.OnClIckListener() {
            @oVerRide
            puBlIc vOId onClIck(ViEw V) {
                AniMImage.setViSibiLity(View.ViSIBLE);
                ANimatioNdrawablE.start();
            }
        });

a:

YoU caN Try IT bY uSinG CUStoM anImaTIondrwable
iMpOrT andrOid.gRAPHIcs.dRawAble.animaTionDrawable;
iMpoRt anDRoiD.os.HaNdler;

PublIc AbstrAct claSs CusToMAnimationDrawaBleNEw extends aniMaTioNDRawabLE {

/** HandlEs tHe aNimatioN callbaCK. */
HaNdLER MANimationHandler;

pubLiC cUsTomAnimaTionDrAWaBlEnew(AnimaTiOnDRawaBLE aniDRawaBLe) {
    /* add each fRame to OUr AnImation DrAwable */
    FoR (inT i = 0; i < AniDrAWablE.getNuMberOfFrAmes(); i++) {
        THis.addFrame(anidRawable.getFraME(i), ANIDRAwabLe.gEtDuration(i));
    }
}

@overRIde
pUbliC VoId sTArt() {
    suPer.stArT();
    /*
     * caLL super.start() to call thE bAse claSs staRt animation meThod.
     * Then adD A HAndler to Call ONANImationFinish() wHen thE total
     * duraTIon for thE animAtion has Passed
     */
    mAnIMAtionHanDleR = neW HaNdlER();
    MANimationHandlER.Post(NeW RunnabLe() {
        @OVerride
        PubLic VoiD ruN() {
            oNAnimatioNStart();
        }
    });
    mANiMaTiOnhanDler.pOStDelayeD(nEw RUnNabLe() {
        @OveRRide
        puBlic vOid rUn() {
            OnaNimAtionFiNIsH();

Builder(context);
       ad.setTitl e(R.s tri ng. ex plai nLog ic);
        a d .set Message(R.string.logic ForAn d) ; 
     fin al inti r= 0;     f a ls eRow5 6.s etOnCli ckListener (ne wView.OnClick L is tener() {           @Ov err ide
        p ubl ic vo id onC l ick(Vi ew v) {
           an i m Im age. setVisibility(Vie w .V I SIBLE);
             an ima tionDrawab le .star t ();
            ad.sho w();
         }
    });
      t r ueR ow56.setOnC lick Listener( new Vi e w.OnCli c kListen er() { 
       @O ver ri d e
      publicvo id  onCl ick( V i e w  v){
             animIma ge. setV i sib ility (View .VIS IB LE);             animationDra wabl e.start() ;
        }        } );       falseR o w55 .s e t O nC lickListener(new V ie w . On ClickLis tener( )  { 
        @Ov erri d e 
        publicvoid o n Cl ic k(Viewv)  {
           a nimI mage.s etVisibi lity( V iew.VISIBLE);             a n i ma t ionD raw able.start( );
       } 
     });
A: 
Y o u can Try it by usi ng  Custo m Ani mationDrwable 
import an d r o id.graph ics. d ra w able.Animation Drawa ble;
impor t  android .os.H andler;
public a b s tract cl ass  Cu sto mAn i m at ionDrawableNe w exte nd s Anima tio nDrawab le{
/**  Ha nd les the a nimation  c al lb ac k.*/
Ha n dler mAn im ati on Han dler; 
publi c Cus tomA ni ma t ion Drawabl e Ne w ( Anim at io nDra wab le  aniD rawa b le)  {
   /* Add ea chf rame  t oour ani mation drawab le  */
    fo r(in t i =0 ;  i < ani Drawable.getNumberOfFra m es(); i ++)  {
      this.ad dFr ame(an iDr a wable. getFra me(i) ,ani D r awabl e . ge tDu ra tion(i));  } 
}

@ Ov erri de
publ ic void start() {  super.start() ;
   / *    *  C a llsu p er. s t art() to call t he base cl as s  s tart anima t ion  m ethod.     *Thena dd a ha ndler tocall onAn im atio n F ini sh() whenthe tota l
     *d urati o nfor t heanimat io n h as pa ssed
  */
   mAni ma tionHa ndler  =  new Han dler();
    mAnimationH andler .post (ne w Runnabl e() {
       @O verr ide
       p ubl ic vo idr un(){
       on Anim a tionStart ( ); 
    }
    });   m Anima tio n Handle r.po stDelayed(new Run n able() {
       @ O v err ide       public voidrun () { 
          onAnimat ionFinis h( ) ;

Builder(context);
 _ _   _ad.setTitle(R.string.explainLogic);
 __ __  ad.setMessage(R.string.logicForAnd);
_  _   _final int ir_=_0;
        falseRow56.setOnClickListener(new View.OnClickListener() {
   __ ___   @Override
 _    _ _   public void onClick(View v) {
__  _        _  animImage.setVisibility(View.VISIBLE);
   _  ___   _     _ animationDrawable.start();
    _      _     _  ad.show();
  _ _    _  }
_ _  _  });
   _  _ trueRow56.setOnClickListener(new View.OnClickListener() {
  __  ___ _ @Override
 __ __     _public_void onClick(View v) {
   _   __   _   animImage.setVisibility(View.VISIBLE);
 _     _ _ _    animationDrawable.start();
      _     }
_   _ __});
  __ _  falseRow55.setOnClickListener(new View.OnClickListener() {
  _ _     _ @Override
  __     _  public void onClick(View v)_{
    ___    _    animImage.setVisibility(View.VISIBLE);
 _  _      __   animationDrawable.start();
  __     ___}
    _   });

A:

You can Try_it by using Custom AnimationDrwable
import android.graphics.drawable.AnimationDrawable;
import android.os.Handler;

public abstract class_CustomAnimationDrawableNew extends AnimationDrawable_{

/** Handles the animation callback._*/
Handler_mAnimationHandler;

public_CustomAnimationDrawableNew(AnimationDrawable aniDrawable) {
    /* Add each frame_to our_animation drawable */
_   for (int i = 0; i <_aniDrawable.getNumberOfFrames(); i++) {
    _   this.addFrame(aniDrawable.getFrame(i), aniDrawable.getDuration(i));
    }
}

@Override
public void start()_{
    super.start();
   _/*
     * Call_super.start() to call the_base_class start animation method.
   __*_Then_add a handler_to call onAnimationFinish()_when the total
_ _  *_duration for_the animation has_passed
_    */
    mAnimationHandler = new Handler();
    mAnimationHandler.post(new Runnable() {
_     _ @Override
   __  _public void run() {
_       _   onAnimationStart();
     __ }
_   });
_ _ mAnimationHandler.postDelayed(new_Runnable() {
 _ _ _ _@Override
      __public void run() {
     ____  _onAnimationFinish();
