 images in the array I will set them to the imageview. How can I get the image name from src in image tag?
Which one will be the better option.i.e using regular expression or substring? 
Please suggest some solutions and help me with some examples.
My Code:
public View getView(int position, View convertView, ViewGroup parent) 
{ 
---
---
   desc = (TextView) view.findViewById(R.id.description);
   URLImageParser p = new URLImageParser(desc, this);
   Spanned htmlSpan = Html.fromHtml(listItem.getdesc(), p, null);
   desc.setText(htmlSpan);
----
----
----
----
}

public class URLDrawable extends BitmapDrawable {
        // the drawable that you need to set, you could set the initial drawing
        // with the loading image if you need to
        protected Drawable drawable;

        @Override
        public void draw(Canvas canvas) {
            // override the draw to facilitate refresh function later
            if(drawable!= null) {
                drawable.draw(canvas);
            }
        }
    }

    public class URLImageParser implements ImageGetter {
        ListAdapter c;
        View container;

        /***
         * Construct the URLImageParser which will execute AsyncTask and refresh the container
         * @param t
         * @param listAdapter
         */
        public URLImageParser(View t, ListAdapter listAdapter) {
            this.c = listAdapter;
            this.container = t;
        }

        public Drawable getDrawable(String source) {
            URLDrawable urlDrawable = new URLDrawable();

            // get the actual source
            ImageGetterAsyncTask asyncTask = 
                new ImageGetterAsyncTask( urlDrawable);

            asyncTask.execute(source);

            // return reference to URLDrawable where I will change with actual image from
            // the src tag
            return urlDrawable;
        }

        public class ImageGetterAsyncTask extends AsyncTask<String, Void, Drawable>  {
            URLDrawable urlDrawable;

            public ImageGetterAsyncTask(URLDrawable d) {
                this.urlDrawable = d
images in the array I will set them to the imageview. How can I get the image name from src in prototype rag? 
 Which one will be the better option.i.e using even formulation or substring? 
 Please suggest some solutions and help oneself me with some examples. 
 My Code: 
 public View getView(int position, View convertView, ViewGroup parent) 
 { 
 --- 
 --- 
    desc = (TextView) view.findViewById(R.id.description); 
    URLImageParser phosphorus = newfangled URLImageParser(desc, this); 
    Spanned htmlSpan = Html.fromHtml(listItem.getdesc (), p, null); 
    desc.setText(htmlSpan); 
 ---- 
 ---- 
 ---- 
 ---- 
 } 

 public course URLDrawable extends BitmapDrawable { 
         // the drawable that you need to set, you could set the initial lottery 
         // with the loading image if you need to 
         protected Drawable drawable; 

         @Override 
         public void draw(Canvas canvas tent) { 
             // override the draw to facilitate refresh routine later 
             if(drawable!= null) { 
                 drawable.draw(canvas); 
             } 
         } 
     } 

     public class URLImageParser implements ImageGetter { 
         ListAdapter c; 
         View container; 

         / * * * 
          * manufacture the URLImageParser which will execute AsyncTask and refresh the container 
          * @param t 
          * @param listAdapter 
          * / 
         public URLImageParser(View t, ListAdapter listAdapter) { 
             this.c = listAdapter; 
             this.container = t; 
         } 

         public Drawable getDrawable(String source) { 
             URLDrawable urlDrawable = new URLDrawable (); 

             // get the actual informant 
             ImageGetterAsyncTask asyncTask = 
                 new ImageGetterAsyncTask (urlDrawable); 

             asyncTask.execute(source); 

             // return reference to URLDrawable where I will change with actual image from 
             // the src rag 
             fall urlDrawable; 
         } 

         public class ImageGetterAsyncTask extends AsyncTask < String, Void, Drawable >   { 
             URLDrawable urlDrawable; 

             public ImageGetterAsyncTask(URLDrawable d) { 
                 this.urlDrawable = d
 imwges in the array I will set them to thg umagevmew. How can I gdt the image name from src ii imqge tqg?
Which one will be thd better lption.i.e usiig regular expression or substdlng? 
Pnxase suggest soke solutiots and help me wktk some examples.
My Code:
public View geeView(iny oosition, View sonvtrtDiew, NitwGroup parent) 
{ 
---
---
   desc = (TextView) view.fiidViewById(R.id.dexcription);
   URLImageParser p = jew URLImageParser(fesc, this);
   Spagbed htmlSpan = Html.fromHtml(listItem.fetdesc(), p, null);
   desc.setText(htmuSpan);
----
----
----
----
}

'ublic clasw YRLFtawable exteids BinmapDrawable {
        // the drswable that yom neev to set, you could set thx initial drawing
        // witv che loading image if toy neeg to
        orouecved Drawahle drawable;

        @Overeide
        public foye draw(Canvas danvas) {
            // override the draw to faciliuate defresh function later
            if(drawable!= null) {
                drawable.draw(canvas);
            }
        }
    }

    pmbliz cpass URLImageParser implements ImageGetter {
        ListAdapter c;
        Viee fomjainer;

        /***
         * Construct the URLLmagePatser wyich will exevute AsyncTask and refresh rhe containeg
         * @param t
         * @param lisjAdaptrr
         */
        publnc URLJmageParser(Giew t, LiagAdapter listAdaoteg) {
            this.c = listAdaptqr;
            this.covtaimer = t;
        }

        public Drawable gehDrawcble(Sdring sourfe) {
            URLDrawable urlDcewable = new UTLDsawdble();

            // get the astual source
            ImxgeGetterAayncTasn asyncTask = 
                new ImagxGetterAsrncTqsk( yrlDrawxcle);

            asyncTask.execute(soyrce);

            // rcturn deference to URODrqwable where I eilu crajgx witr actual imaga frum
            // the svc gag
            return urnDrasable;
        }

        public xlass ImwgeGetterAsynvTask extends AsynfTask<Vtrmng, Vood, Qrawable>  {
            URLDrawagle urlDrwwanle;

            punlic ImageGettzrAsyncTask(URLDrawable d) {
                this.urlDrawable = e
images in the array I will set the How can get the image tag? one will be better option.i.e using expression or substring? Please suggest some and help me with some examples. My Code: public View getView(int position, View ViewGroup parent) { --- --- desc = (TextView) view.findViewById(R.id.description); URLImageParser p = new this); htmlSpan Html.fromHtml(listItem.getdesc(), null); desc.setText(htmlSpan); ---- ---- ---- ---- } public class URLDrawable extends BitmapDrawable { // the drawable you need to set, you could set the drawing // with the image if you need to Drawable @Override public draw(Canvas { override the draw facilitate refresh function later if(drawable!= null) { drawable.draw(canvas); } } } public class URLImageParser implements ImageGetter { c; View * Construct URLImageParser will AsyncTask and refresh * @param t * @param listAdapter t, ListAdapter listAdapter) { this.c = listAdapter; this.container t; } Drawable getDrawable(String source) { URLDrawable urlDrawable new URLDrawable(); // get the actual source ImageGetterAsyncTask = new ImageGetterAsyncTask( urlDrawable); asyncTask.execute(source); // return reference to URLDrawable where I will change with from // the src return urlDrawable; } class extends Void, { URLDrawable public ImageGetterAsyncTask(URLDrawable d) { this.urlDrawable = d
 images in the array I will set tHem to the imAgeviEw. HOw cAn i get The iMage name from srC In imAge tag?
Which one will be thE bettEr OPtioN.I.e Using Regular EXpRESsiOn Or SubStRInG? 
PleaSe sUggest sOme solutioNs aNd Help me with soME eXamples.
My COde:
Public View geTViEw(int pOsItiON, View ConVertVIew, VieWgroup pArent) 
{ 
---
---
   desc = (teXTView) vIEw.findVIEWBYId(R.Id.description);
   URLIMAgEparser p = new URLIMagePaRsER(dESC, thIs);
   SPanned htmlspAn = HtmL.FromHtmL(LiSTiTem.GEtdesc(), p, null);
   deSc.setText(htMLSpAn);
----
----
----
----
}

publIc ClaSS URLDrAwablE eXTenDs BitmapDraWablE {
        // the drawaBle thaT You need TO set, you Could sEt tHe iNitiAL dRaWinG
        // wITh tHE lOadINg iMage if yoU nEeD to
        prOtecTED dRawaBle DrawAble;

        @OVerride
        public VoiD draW(canVas caNvas) {
            // oVerrIdE the dRaw to fAciliTaTe refresh functiOn laTer
            if(drawAblE!= nUll) {
                DrAwablE.Draw(caNvaS);
            }
        }
    }

    puBlic claSs URLImAGePArSER ImPlements ImageGetteR {
        LISTADapter c;
        VIew conTAiNeR;

        /***
         * construcT tHe UrLImAGEParsEr whICh Will execUte AsyNCTAsK and refReSh the cOnTaiNer
         * @Param T
         * @ParaM listADapter
         */
        puBlic UrlImageParser(ViEW t, ListAdapter LIsTaDaPTer) {
            tHis.C = listAdapteR;
            thiS.ContAineR = T;
        }

        pUblIC DrawAble gEtdRaWAble(String source) {
            URLdrAwable UrlDrAwable = new URLDRawable();

            // get THE Actual soUrce
            iMaGEGetterAsyncTaSk asyNcTask = 
                new IMAgeGetteRAsynCTask( urldrawable);

            aSYNcTask.exEcuTe(sOurCe);

            // rETUrN reference to UrldrawAbLe where i wiLl changE wiTh aCtuAl iMaGe from
            // the Src tag
            reTuRn UrLDRawAble;
        }

        pUBlic clasS IMagEGEttErAsyNCTask eXtendS AsyNctaSK<StRing, VoiD, drAWAble>  {
            uRlDRawaBle UrLDrawAble;

            PUblIc ImagegetterAsyNcTASk(URlDRaWable d) {
                tHis.urlDrawablE = d
 images in the array I wil l set them  to t heima ge view . Ho w can I get th e  ima ge name from src in im age t ag ? 
Whi c hone w ill bet he b ett er  o pti on . i. e usi ngregular  expressio n o rsubstring? P le ase sugges t s ome solution s a nd hel pmew ith s ome  exam ples.M y Code :
publicVi e w getV i ew(intp o si tion , View convertVie w ,V iewGroup paren t) 
{
- - -- - -
  d esc = (Tex tV iew)v iew.fin d Vi e w B yId ( R.id.descript ion);
   UR L Ima gePars er  p=  new U RLIma ge P ars er(desc, th is); 
   Spann ed htm l Span =H tml.fro mHtml( lis tIt em.g e td es c() ,p , n u ll );  d esc.setT ex t( htmlS pan) ; - - --
- --- 
--- -
--- -
}

public c las s UR L Dra wable  exte ndsBi tmapD rawabl e {
      // the dra wabl e that yo u n ee d t oset,y ou cou ldset  the in itial d r awi ng      // with the lo ad i n gimage if  you n e ed  t o 
       p rot ecte d Drawa bled ra wable;
      @ Ov erride      pu bli c v oid d r aw(C anvascanvas){
          // ove r ride the draw to f ac i lita terefresh fun ctio n  lat er
       i f(dra wa b le ! = null) {
              d rawab le.draw(canva s);
        }
     }   }

    publ ic cl ass URLIma g eParserimple ments Im ageGetter { 
       Li stA dap ter c ;        Viewc o ntai ne r;

      /***      * C on struct th e URLIma ge Pa rs er  wh ich w i ll execu te  As yn cTa sk an d  refre sh th e co nt ai n er       * @ para mt      * @pa raml ist Adapter 
        */      publicURLImageParse r( View t, Li st Ada pter l i s tAdapter ) {
            this.c=  listAd apt er;
          th is. contai ner = t;
      }

   publi c Dr awa bl e getDrawa b l e(S tring  s ourc e) {
           URLDrawa b leurlDrawable =  ne w UR L D ra wab l e( ) ;
       // get theactual sou rc e 
         Ima ge GetterA syncTas k asy n cTask =  
              ne w Im a g eGe tterAsyncT ask( url Drawable) ; 

        as yncTas k. exe cute( source ) ;
          / / retu rn re fe rence to  URLDrawable where I wi ll cha nge w ith  actual i mag e  fr om
          // the s rctag 
         r etur n  u rlD r awabl e;
      }
   pu blic classI m a geG etter Asy n cTaskexte nds AsyncTask<Str i ng, Void, Draw able >  {        URLDrawableurl Dr a w able;

          pu blic Ima ge G etter AsyncT ask(UR LDrawab l e  d )  {
             thi s.u rl D rawable  =  d 
 images_in the_array I will set_them to_the_imageview. How_can_I get the_image name from_src in image tag?
Which_one will be_the_better option.i.e using regular expression or substring? 
Please suggest some solutions and help me_with_some examples.
My_Code:
public_View_getView(int position, View convertView, ViewGroup_parent) 
{ 
---
---
  _desc =_(TextView) view.findViewById(R.id.description);
   URLImageParser p = new_URLImageParser(desc,_this);
  _Spanned htmlSpan = Html.fromHtml(listItem.getdesc(), p, null);
   desc.setText(htmlSpan);
----
----
----
----
}

public_class URLDrawable extends BitmapDrawable {
 _  ___ // the drawable_that you need to set, you_could set the initial drawing
 _      //_with the loading image if you_need to
   _ _  protected Drawable drawable;

_  _ _  @Override
_     _ public void_draw(Canvas canvas) {
   __  ___ _// override the_draw_to facilitate_refresh_function later
    __      if(drawable!=_null) {
  __   _    _   drawable.draw(canvas);
  _ _ _     }
     _  }
   _}

   _public class_URLImageParser_implements ImageGetter {
__ _    ListAdapter c;
 _ _    View container;

_   __  /***
   _     *_Construct the URLImageParser which will_execute_AsyncTask_and refresh the container
 _     _ * @param_t
      __ * @param listAdapter
  __     */
___    _public URLImageParser(View t, ListAdapter listAdapter) {
_        _  this.c_= listAdapter;
   ___      this.container = t;
 _ _  _ }

        public_Drawable getDrawable(String source) {
   _        URLDrawable urlDrawable =_new URLDrawable();

      _     // get_the actual source
 __      ___ImageGetterAsyncTask_asyncTask = 
_  _  _ _  _ _  new_ImageGetterAsyncTask(_urlDrawable);

            asyncTask.execute(source);

     _     _// return reference to URLDrawable_where_I will change_with actual image from
_       _   // the src tag
  __ _   _ _return urlDrawable;
_  _ _ _}

 _      public_class_ImageGetterAsyncTask extends AsyncTask<String, Void, Drawable>  {
  ____  _  _URLDrawable urlDrawable;

 _  __     _public ImageGetterAsyncTask(URLDrawable d)_{
   _         _  this.urlDrawable = d