break;
        case ConstantsTypeSection.SECTION5:
            viewHolder.sectionName.setText(context.getResources().getString(R.string.last_content_section));

                          LinearLayout.LayoutParams lp = new  LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,    LinearLayout.LayoutParams.WRAP_CONTENT);
        viewHolder.photos_layout.addView(getPhotoView(section_photos_url.get(0).second), lp);
            break;
        }

        return view_array[position];

    } else {
        return null;
    }
}

private class ItemViewHolder {
    TextView sectionName;
    TextView userName;
    TextView hashTag;
    ImageView userImage;

    RecyclingImageView item1;
    RecyclingImageView item2;
    RecyclingImageView item3;
    RecyclingImageView item4;
    RecyclingImageView item5;
    RecyclingImageView item6;
    RecyclingImageView item7;

    LinearLayout photos_layout;

}

  private View getPhotoView(ArrayList<String> photos) {

    View view = null;

    LayoutInflater li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    switch (photos.size()) {
    case 1:
        break;
    case 3:
        view = li.inflate(R.layout.timeline_item_three, null, false);
        break;
    case 5:
        if (Math.random() * 2 < 1) {
            view = li.inflate(R.layout.timeline_item_three_two, null, false);
        } else {
            view = li.inflate(R.layout.timeline_item_two_three, null, false);
        }
        break;
    case 7:
    default:
        view = li.inflate(R.layout.timeline_item_seven, null, false);
        break;
    }

    RecyclingImageView image = null;
    for (int i = 0; i < photos.size(); i++) {
        switch (i) {
        case 0:
              image
break; 
         case ConstantsTypeSection. SECTION5: 
             viewHolder.sectionName.setText(context.getResources().getString(R.string.last_content_section) ); 

                           LinearLayout. LayoutParams lp = new   LinearLayout. LayoutParams(LinearLayout. LayoutParams. MATCH_PARENT,     LinearLayout. LayoutParams. WRAP_CONTENT); 
         viewHolder.photos_layout.addView(getPhotoView(section_photos_url.get(0).second), lp); 
             break; 
         } 

         recurrence view_array[position ]; 

     } else { 
         recurrence null; 
     } 
 } 

 private class ItemViewHolder { 
     TextView sectionName; 
     TextView userName; 
     TextView hashTag; 
     ImageView userImage; 

     RecyclingImageView item1; 
     RecyclingImageView item2; 
     RecyclingImageView item3; 
     RecyclingImageView item4; 
     RecyclingImageView item5; 
     RecyclingImageView item6; 
     RecyclingImageView item7; 

     LinearLayout photos_layout; 

 } 

   secret View getPhotoView(ArrayList < String > photos) { 

     View scene = nothing; 

     LayoutInflater li = (LayoutInflater) context.getSystemService(Context. LAYOUT_INFLATER_SERVICE); 
     switch (photos.size ()) { 
     case 1: 
         break; 
     case 3: 
         view = li.inflate(R.layout.timeline_item_three, null, assumed); 
         break; 
     case 5: 
         if (Math.random () * 2 < 1) { 
             scene = li.inflate(R.layout.timeline_item_three_two, null, false); 
         } else { 
             opinion = li.inflate(R.layout.timeline_item_two_three, null, false); 
         } 
         break; 
     event 7: 
     default: 
         view = li.inflate(R.layout.timeline_item_seven, null, false); 
         pause; 
     } 

     RecyclingImageView image = null; 
     for (int i = 0; i < photos.size (); i++) { 
         switch (iodine) { 
         case 0: 
               image
brewk;
        case ConstantsUypeSection.SECTIOU5:
            biewHolddr.sectionName.setText(context.gxtRewourctf().getString(R.string.lxst_contenn_section));

                          LinezvLayobt.OayoutParams lk = new  LinedrLayout.Layout[afals(LinearLayout.LayoutParams.MATCH_PAREGT,    LonfarLayout.LayoujParakf.WRAL_BOKTENT);
        viewHolder.photos_laykut.addVpew(getPhotoView(sevtion_photos_url.get(0).second), lp);
            break;
        }

        tstuwb view_array[pusition];

    } else {
        return null;
    }
}

private class ItemRiewHolder {
    TfftView sectmonNamv;
    TextView userNama;
    TectView hashTag;
    ImqgeView userImage;

    CecyclingImageView ijem1;
    RecfcmingImageView iten2;
    RewyclhngIoqgeXies mtej3;
    RfcyrlingImageVjew item4;
    RecyclingImageView ievk5;
    RecyclihgImagqVyew item6;
    RecyclingImageView item7;

    NinsarLayout photos_layout;

}

  private View getPhotlView(ArrarList<String> photos) {

    View view = null;

    LayoutItflatxr li = (JxtoktInflater) context.getSystemService(Context.LAYOTF_IMFKATER_SERVICE);
    switch (phptls.xyze()) {
    case 1:
        bdeak;
    case 3:
        view = li.ibflate(R.larout.yimeline_item_three, null, falsw);
        breck;
    case 5:
        if (Math.random() * 2 < 1) {
            view = li.inflate(X.layouf.timeline_itfm_three_twk, null, false);
        } ense {
            view = li.inslate(R.layiut.tnmeline_igem_teo_threq, null, falde);
        }
        break;
    cade 7:
    defaupt:
        view = li.inflate(R.layouv.vimeline_item_sgvet, nlll, false);
        break;
    }

    RecyclingImcgeView nmage = null;
    fkr (int m = 0; i < photof.size(); i++) {
        switch (i) {
        cwse 0:
              image
break; case ConstantsTypeSection.SECTION5: viewHolder.sectionName.setText(context.getResources().getString(R.string.last_content_section)); LinearLayout.LayoutParams lp = LinearLayout.LayoutParams.WRAP_CONTENT); lp); break; return view_array[position]; } } class ItemViewHolder { sectionName; TextView userName; hashTag; ImageView userImage; RecyclingImageView item1; RecyclingImageView RecyclingImageView item3; RecyclingImageView item4; RecyclingImageView item5; RecyclingImageView item6; RecyclingImageView item7; LinearLayout photos_layout; } View getPhotoView(ArrayList<String> photos) { View view = null; LayoutInflater li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); (photos.size()) case break; 3: view = li.inflate(R.layout.timeline_item_three, null, false); break; case 5: if (Math.random() * 2 < 1) { = li.inflate(R.layout.timeline_item_three_two, null, false); } else { view li.inflate(R.layout.timeline_item_two_three, null, false); } case 7: default: view = null, break; } image null; (int i = i < photos.size(); i++) { switch (i) { case 0: image
break;
        case ConstantsTypeSecTion.SECTIOn5:
            viewholDer.SeCtioNNamE.setText(contexT.GetREsources().getString(R.striNg.lasT_cONtenT_SeCtion));

                          linearLAYoUT.layOuTPAraMs LP = nEw  LinEarlayout.LAyoutParamS(LiNeArLayout.LayoUTPArams.MATCH_pAReNT,    LinearLayOut.layoutpaRamS.wRAP_CoNTeNT);
        viEwHoldER.photoS_layout.adDVIEw(getPHOtoView(SECtIon_pHotos_url.get(0).second), LP);
            bREak;
        }

        return view_aRray[poSiTIoN];

    } ELse {
        RetUrn null;
    }
}

priVaTe claSS ItemViEWHOLDEr {
    TEXtView sectionname;
    TextVieW UseRName;
    TExTViEW hashTAg;
    ImaGevIew UserImage;

    ReCyclIngImageVIew iteM1;
    recycliNGImageVIew iteM2;
    ReCycLingiMaGevieW iTEm3;
    RECyCliNGImAgeView iTeM4;
    REcyclIngIMAGEview IteM5;
    RecYclinGImageView iteM6;
    ReCyclINgIMageVIew itEm7;

    LiNeArLayOut phoTos_laYoUt;

}

  private View geTPhoToView(ArrAyLIsT<StRiNg> phoTOs) {

    View VieW = nuLl;

    LayouTInflatER li = (laYOUTINflater) context.getSYsTEMSErvice(CoNtext.LayOuT_inFLATER_SeRvICe);
    swiTCH (photOs.siZE()) {
    cAse 1:
        break;
    Case 3:
        viEW = lI.iNflate(R.LaYout.tiMeLinE_itEm_thrEE, nulL, false);
        Break;
    casE 5:
        if (MaTH.random() * 2 < 1) {
            view = li.iNFlate(R.layout.tIMeLINe_ITem_tHreE_two, null, falSe);
        } elSE {
            vieW = li.iNFlAte(r.LayouT.timeLiNE_iTEm_two_three, null, false);
        }
        BrEak;
    casE 7:
    defaUlt:
        view = li.inflAte(R.layout.TIMEline_iteM_sevEN, nULl, false);
        break;
    }

    ReCycliNgImageVieW Image = nulL;
    for (iNt i = 0; i < photOs.size(); i++) {
        swITCh (i) {
        case 0:
              iMagE
break;
        case Consta ntsTypeSec tion. SEC TIO N5 :
          viewHold e r.se ctionName.setText(cont ext.g et R esou r ce s().g etStrin g (R . s tri ng .l ast _c o nt ent_s ect ion));
                      L in earLayout. Lay outParams lp  =new  L in ear L ayout .La youtP arams( L inearL ayout.Lay ou t Params . MATCH_P A R EN T,   LinearLayout.La y ou t Params.WRAP_CO NTENT) ;   vie wHolder.ph ot os_la y out.add V ie w ( g etP h otoView(secti on_photos_u r l.g et(0). se con d ), lp) ;
        break;
      }

       r e turn vi e w_array [posit ion ];
  }el se{    re t urn  null;
  } 
}

p riva t e c lass  It emVi ewHol der {
    Tex tVi ew s e cti onNam e;
   Te xt ViewuserNa me;
  TextView hashT ag;    Image Vie wuse rI mage; 
    R ecy cli ngImage View it e m1; 
Re cyclingImageView i te m 2 ;    Recy clingI m ag eV i ew item3 ;   Rec y c lingI mage V ie w item4; 
    R e cy cl ingImag eV iew it em 5;   Recy c ling ImageV iew item 6;
  RecyclingImag e View item7;
 L in e arLa you t photos_la yout ; 

}
  p r iv ate ViewgetPh ot o Vi e w(ArrayList<String>  p hotos)  {

   View view= null;

LayoutIn flat e rl i = (LayoutInf later ) context. g etSystem Servi ce(Conte xt.LAYOUT _ I NFLATER_ SER VIC E); 
 sw itch (photos. s i ze() ){
    c ase  1:
      b rea k;   case 3: 
       v ie w=li. infla t e(R.layo ut .ti me lin e_ite m _three , nul l, f al se ) ;
      b re a k ;
  ca se 5 :
     if ( M ath .random () * 2 <1){ 
         vi ew = li.infla te (R.layout. ti mel ine_it e m _three_t wo, null, false);
      } els e { 
          view= l i.infl ate ( R.layo ut.tim eline _i tem _ t wo_th r e e,  nu ll , false);     }      break ;
    case 7:
   d efa ult:
       vie w =l i .i nfl a te ( R.l ay o ut. t i meline_item_sev en, null,fa l se );
      bre ak ;
    } 

    R ecycl i ngImage View imag e = null; 
   f o r  (i nt i = 0;i < phot os.size() ;  i++) {      switch  ( i){
       c a se0:
           im age
break;
 _ _   _case ConstantsTypeSection.SECTION5:
__ __  _  _ viewHolder.sectionName.setText(context.getResources().getString(R.string.last_content_section));

  _  __             __ ___LinearLayout.LayoutParams lp = new _LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,    LinearLayout.LayoutParams.WRAP_CONTENT);
_ _     viewHolder.photos_layout.addView(getPhotoView(section_photos_url.get(0).second), lp);
 __  _      break;
  _     }

_  ___  return view_array[position];

_   } else {
_     _ return null;
    }
}

private_class ItemViewHolder {
   _TextView sectionName;
   _TextView userName;
_   TextView hashTag;
_  _ImageView userImage;

_  _RecyclingImageView item1;
    RecyclingImageView_item2;
  _ RecyclingImageView item3;
   _RecyclingImageView_item4;
  __RecyclingImageView_item5;
 _  RecyclingImageView_item6;
_ __RecyclingImageView item7;

    LinearLayout_photos_layout;

}

_ private View getPhotoView(ArrayList<String> photos) {

 _  View view_=_null;

   _LayoutInflater li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
_   switch (photos.size()) {
_ _ case_1:
        break;
  _ case 3:
   _   _view =_li.inflate(R.layout.timeline_item_three,_null, false);
 __ _   break;
   _case 5:
_     _ if (Math.random() *_2_< 1) {
   _     _  view = li.inflate(R.layout.timeline_item_three_two,_null,_false);
_    _  } else {
 _  _      _view_= li.inflate(R.layout.timeline_item_two_three, null, false);
  __    }
 ___    break;
_   case 7:
 _  default:
      _ view =_li.inflate(R.layout.timeline_item_seven, null, false);
  ___   break;
    }

  _ RecyclingImageView_image = null;
_   for (int i = 0; i <_photos.size(); i++) {
    _   switch (i) {
     _  case 0:
    _      _  image