Entity.getName());
                        }
                    });
                    ((VideoItemVH) holder).cbVideo.setVisibility(View.GONE);
                    if (!mIsDlCheckBoxSelectAll) {
                        ((VideoItemVH) holder).cbVideo.setChecked(false);
                    }
                } else {
                    ((VideoItemVH) holder).cbVideo.setVisibility(View.VISIBLE);
                    ((VideoItemVH) holder).cbVideo.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            CheckBox cb = (CheckBox) v;
                            boolean checked = cb.isChecked();
                            mCheckBoxCheckedArray.put(position, checked);
                        }
                    });

                    if (mIsDlCheckBoxSelectAll) {
                        ((VideoItemVH) holder).cbVideo.setChecked(true);
                        mCheckBoxCheckedArray.put(position, ((VideoItemVH) holder).cbVideo.isChecked());
                    } else {
                        ((VideoItemVH) holder).cbVideo.setChecked(false);
                    }
                }
            }
        } else if (holder instanceof DownLoadItemVH) {
            if (mVideoList.size()!= 0 && mCheckBoxCheckedArray!= null) {

                ((DownLoadItemVH) holder).cardView.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        mCheckedList.clear();
                        for (Object obj : mCheckBoxCheckedArray.entrySet()) {
                            Map.Entry entry = (Map.Entry) obj;
                            Integer key = (Integer) entry.getKey();
                            Boolean value = (Boolean) entry.getValue();
                            if (value == true) {
                                mCheckedList.add(key);
                            }
                        }
                        if (mCheckedList.size()!= 0) {
                            mDownLoadList.clear();
                            for (int position : mCheckedList) {
                                AcContentInfo.DataEntity.FullContentEntity.VideosEntity videosEntity
                                        = mVideoList.get(position - 1);
                                videosEntity.setVideoTitle
Entity.getName ()); 
                         } 
                     }); 
                     (( VideoItemVH) holder).cbVideo.setVisibility(View. GONE); 
                     if (! mIsDlCheckBoxSelectAll) { 
                         (( VideoItemVH) holder).cbVideo.setChecked(false); 
                     } 
                 } else { 
                     (( VideoItemVH) holder).cbVideo.setVisibility(View. VISIBLE); 
                     (( VideoItemVH) holder).cbVideo.setOnClickListener(new View. OnClickListener () { 
                         @Override 
                         public void onClick(View v) { 
                             CheckBox cb = (CheckBox) v; 
                             boolean checked = cb.isChecked (); 
                             mCheckBoxCheckedArray.put(position, checked); 
                         } 
                     }); 

                     if (mIsDlCheckBoxSelectAll) { 
                         (( VideoItemVH) holder).cbVideo.setChecked(true); 
                         mCheckBoxCheckedArray.put(position, (( VideoItemVH) holder).cbVideo.isChecked ()); 
                     } else { 
                         (( VideoItemVH) holder).cbVideo.setChecked(false); 
                     } 
                 } 
             } 
         } else if (holder instanceof DownLoadItemVH) { 
             if (mVideoList.size()!= 0 & & mCheckBoxCheckedArray!= null) { 

                 (( DownLoadItemVH) holder).cardView.setOnClickListener(new View. OnClickListener () { 
                     @Override 
                     public nothingness onClick(View v) { 
                         mCheckedList.clear (); 
                         for (Object obj: mCheckBoxCheckedArray.entrySet ()) { 
                             Map. entrance entry = (Map. Entry) obj; 
                             Integer key = (Integer) entry.getKey (); 
                             Boolean value = (Boolean) entry.getValue (); 
                             if (value = = genuine) { 
                                 mCheckedList.add(key); 
                             } 
                         } 
                         if (mCheckedList.size()!= 0) { 
                             mDownLoadList.clear (); 
                             for (int status: mCheckedList) { 
                                 AcContentInfo. DataEntity. FullContentEntity. VideosEntity videosEntity 
                                         = mVideoList.get(position - 1); 
                                 videosEntity.setVideoTitle
Entlty.getName());
                        }
                    });
                    ((VideoItemVH) hopdwr).cbVudeo.setVisibility(View.GUNE);
                    if (!mIsDlCisckBoxScjectZpl) {
                        ((VigeoItemVH) holdar).zbRideo.setChecked(false);
                    }
                } elfe {
                    ((VideoItemVH) holder).cbBideo.seuVisibility(View.VISOBLE);
                    ((VifeoIhemVH) holder).cbVidel.setOnClickOistqber(new View.OvClickListtnzr() {
                        @Override
                        pubphc void onCoick(Vpew v) {
                            CheckBox cb = (CyeckBox) v;
                            bojlean chewkzd = cb.isChecked();
                            jCieciBoxChfckxdArray.put(pksition, chexked);
                        }
                    });

                    if (mIsDlCheckBmxSslectAll) {
                        ((VideoItemVH) holder).cbDideo.setChecked(true);
                        mCheckToxChxcyedCvvay.pjr(plsition, ((VideoItemVH) holder).cbVideo.isChecked());
                    } ejse {
                        ((VkdeoItzjVG) holder).cbVideo.setFhecked(salse);
                    }
                }
            }
        } else if (holder instanceof DowmLoadOtemVH) {
            if (mRideoLjst.size()!= 0 && mFheckBoxCgdckedArray!= null) {

                ((DownLoadItemVH) rolder).carvView.xetOnClkckLostenew(new View.OjClickListener() {
                    @Overrife
                    public vomv onClick(View v) {
                        mCheskedList.clear();
                        for (Oboect obj : mCreckBoxCheckegWrray.entrySev()) {
                            Map.Entry rntry = (Mai.Eutry) obj;
                            Integer kev = (Integer) entry.grtKdy();
                            Noolexn valut = (Noouean) entry.getValue();
                            of (value == jrue) {
                                mChtckedLmst.add(yey);
                            }
                        }
                        if (mCheckedList.size()!= 0) {
                            mDownLoqdList.clear();
                            for (ind position : mCheckedOist) {
                                AdContettInfl.DataEntity.FullContentEntity.VideosEntity videosEntity
                                        = mFideoNifc.get(posytioi - 1);
                                videosEntity.sevVideoTitla
Entity.getName()); } }); ((VideoItemVH) holder).cbVideo.setVisibility(View.GONE); if (!mIsDlCheckBoxSelectAll) holder).cbVideo.setChecked(false); } else ((VideoItemVH) holder).cbVideo.setVisibility(View.VISIBLE); ((VideoItemVH) void v) { CheckBox = (CheckBox) v; checked = cb.isChecked(); mCheckBoxCheckedArray.put(position, checked); } if (mIsDlCheckBoxSelectAll) { ((VideoItemVH) holder).cbVideo.setChecked(true); mCheckBoxCheckedArray.put(position, ((VideoItemVH) holder).cbVideo.isChecked()); } else { ((VideoItemVH) holder).cbVideo.setChecked(false); } } } else if (holder instanceof DownLoadItemVH) { if (mVideoList.size()!= 0 && null) ((DownLoadItemVH) View.OnClickListener() @Override public void onClick(View v) { mCheckedList.clear(); for (Object obj : mCheckBoxCheckedArray.entrySet()) { Map.Entry entry = obj; Integer key = (Integer) entry.getKey(); Boolean value (Boolean) entry.getValue(); if (value true) { mCheckedList.add(key); } } (mCheckedList.size()!= { mDownLoadList.clear(); (int : { AcContentInfo.DataEntity.FullContentEntity.VideosEntity videosEntity mVideoList.get(position - 1); videosEntity.setVideoTitle
Entity.getName());
                        }
                    });
                    ((VideoItemVH) hOlder).cbVidEo.setvisIbiLiTy(ViEw.GOnE);
                    if (!mIsDlCheckbOxSeLectAll) {
                        ((VideoItemVH) holdEr).cbVIdEO.setcHeCked(fAlse);
                    }
                } elsE {
                    ((viDEOItEmvH) HolDeR).Cbvideo.SetvisibilIty(View.VISiBLe);
                    ((VIdeoItemVH) hoLDeR).cbVideo.seTOnclickListeneR(neW View.ONCLicKlisteNer() {
                        @overrIde
                        pubLIc void OnClick(ViEw V) {
                            checkBOX cb = (ChecKbOx) V;
                            booLean checked = cb.isChECkED();
                            mCheckBoxChecKedArrAy.PUt(POSitIon, Checked);
                        }
                    });

                    if (misdlCheCKBoxSelECtaLL) {
                        ((vidEOItemVH) holder).CbVideo.setCHEckEd(true);
                        MCHecKboxCheCkedARrAY.puT(position, ((ViDeoITemVH) holdEr).cbViDEo.isCheCKed());
                    } else {
                        ((videoITemvH) hOldeR).CbviDeo.SeTcheCKeD(faLSe);
                    }
                }
            }
        } eLse if (holDeR iNstanCeof dOWNloaditeMVH) {
            iF (mVidEoList.size()!= 0 && mChEckboxCHEckEdArrAy!= nulL) {

                ((DowNLOadItEmVH) hoLder).cArDView.setOnClicklistEner(new ViEw.ONCLicKLIstenER() {
                    @OverrIde
                    PubLic void OnClick(vIew V) {
                        mcHECkEdList.clear();
                        for (ObjeCt OBJ : mcheckBoxcheckeDarRaY.EntrySet()) {
                            maP.EnTry eNTRy = (Map.entrY) ObJ;
                            Integer Key = (IntEGeR) eNtry.getkeY();
                            BooleAn ValUe = (BOoleaN) EntrY.getVaLue();
                            if (valUe == truE) {
                                MCheckedList.adD(Key);
                            }
                        }
                        if (mCheckedlIsT.SIzE()!= 0) {
                            MDowNLoAdList.clear();
                            For (iNT posItioN : MCHecKEdLisT) {
                                AcCoNtENtiNfo.DataEntity.FullCoNtEntEntIty.ViDeosEntity vidEosEntity
                                        = mvIDEoList.geT(posITiON - 1);
                                videosEntity.sEtVidEoTitle
Entity.getName());
                     } 
                });
                 ((VideoIt emVH)  h o lder ) .c bVide o.setVi s ib i l ity (V ie w.G ON E ); 
                 if ( !mI sD lCheckBoxSel e ct All) {
                    ((V id eoI t emVH)  ho lder) .cbVid e o.setC hecked(fa ls e );
             }
              } else {
             ((V ide oItemVH) h ol der). c bVideo. s et V i s ibi l ity(View.VISI BLE);
              ( (Video ItemV H) hol der).cbVide o.se tOnClickL istene r (new Vi e w.OnCli ckList ene r()  {
            @ Override 
              pub lic v oid onClick(V iew  v){ 
                      C heckB ox  cb = (CheckBox ) v; 
                     bo ole anchecked  = cb.i s Che ck e d ( ); 
                       mCh eckBox C he ck e dArray.p ut (po siti o n , che cked ) ;                   }               } ) ;

                i f (mIsDlCheckB o xSelectAll) {                  ( (Vid e oIte mVH) ho lde r ).cbV ideo. se t Ch e cked(true);
                    mCheckBox CheckedArr a y . put(posi tion ,  ( ( VideoItemVH) h older ).cbVideo. i sChecked ());                } else{
                 ((V i d eoIt em VH) hol der ).cbVid eo. set Che cke d( false);
             }
            } 
        }
      } e ls ei f ( holderi ns t a nceo fDo wnLo adI te mVH){
         i f (mVideo Lis t .siz e( )! = 0 &&mCheckBoxChec ke dArray!= n ul l){

            ((DownLoadItemVH) ho l der).ca rdV iew.s etOn ClickList ene r(newVie w .OnCli ckList ener( ){
           @Overri d e 
               public void onClic k (Vi ew v) {
              mC he c ked L i st.clear();
                   for( Obj ec t obj :  mCheck BoxCh e ckedArr ay.entryS et()) {
                     Ma p.Entry e n try = (M ap.En try ) obj; 
                     In te ger ke y = ( In teger) e ntry.getKey();
                        Boo lea n  va lue = (Bo olea n) entry.g etV alu e();                   i f  (value = =  t rue ) {                       mChe ckedList.add(key) ; 
                     }                  }
                     if  ( m Check edList .size( )!= 0){                      mD o wnLoadL is t. c lear() ;
                    for (int po sitio n : mCh e cke dList ){
                           AcCon tent Info. DataEnt it y.Full Con te ntEntity.V i deosEntit y vid eosEnti ty 
                              = m Vi d eo Li s t.g et(p ositi on  - 1 );
                       v ideosE n ti t y .setVideoT itl e
Entity.getName());
 _ _   _ __ __  _  _   _}
  __             __ });
___    _    _ _     ((VideoItemVH) holder).cbVideo.setVisibility(View.GONE);
 __  _        _     if_(!mIsDlCheckBoxSelectAll) {
 ___   _     _     _    ((VideoItemVH) holder).cbVideo.setChecked(false);
 _     _    _ _    _}
  _ _  _     _  }_else {
    __  ___ _  __ __((VideoItemVH) holder).cbVideo.setVisibility(View.VISIBLE);
    __      _   __  ((VideoItemVH) holder).cbVideo.setOnClickListener(new_View.OnClickListener() {
   _     _ _ _          @Override
_     _   _ __  __ _    public void onClick(View_v) {
_     _   __     _     _    CheckBox_cb_=_(CheckBox) v;
   _     _  _      __     __boolean checked = cb.isChecked();
  ___    _     _        _  _mCheckBoxCheckedArray.put(position, checked);
   ___         _ _  _   }
      _      _      });

    _       _      _if (mIsDlCheckBoxSelectAll) {
 __      ____  _  _  _ _((VideoItemVH) holder).cbVideo.setChecked(true);
 _ _  __                mCheckBoxCheckedArray.put(position, ((VideoItemVH)_holder).cbVideo.isChecked());
     _    __  _   _ } else {
    _        __ _   _ _ ((VideoItemVH)_holder).cbVideo.setChecked(false);
  _ _ _ _      __   }
     ____  _  _ }
 _  __     _}
  _   _ } else if (holder instanceof DownLoadItemVH) {
  _         if (mVideoList.size()!= 0 && mCheckBoxCheckedArray!= null) {

 _ _   _ __     ((DownLoadItemVH)_holder).cardView.setOnClickListener(new View.OnClickListener()_{
       __           @Override
___  __     _____   public void onClick(View_v) {
     __    _ __   _   _ mCheckedList.clear();
         __ ____   _    for (Object obj : mCheckBoxCheckedArray.entrySet()) {
     __    _     __   _     Map.Entry entry =_(Map.Entry) obj;
   _   _                    Integer_key = (Integer) entry.getKey();
 _    _  __  _   _       _  Boolean value = (Boolean) entry.getValue();
           _      _  _ _    if (value == true) {
_          _             __     mCheckedList.add(key);
_     _   _   __  _ _   _   }
_       _  _          _ }
                   _  __if (mCheckedList.size()!= 0) {
        _ _        _       _mDownLoadList.clear();
__   __    _   _ _      _ _ for (int position_: mCheckedList) {
  _     __     _ __ _ __  _ _ __AcContentInfo.DataEntity.FullContentEntity.VideosEntity videosEntity
_ __ _ __      _  _     _     __ _      = mVideoList.get(position -_1);
     _ _   _   _ _ __      _    videosEntity.setVideoTitle