android - Error in wrapping a custom adapter around cwac-endless adapter -


i'm using custom adapter , wrapping around cwac-endless adapter. problem wrapping condition being ignored , method inside cacheinbackground() being called infinitely. i'm attaching concerned code.please suggest me solution this. thank you.

    @override         protected boolean cacheinbackground() {           systemclock.sleep(100);       // pretend work             try {             msg=getmsgs();         } catch (clientprotocolexception e) {             // todo auto-generated catch block             e.printstacktrace();         } catch (ioexception e) {             // todo auto-generated catch block             e.printstacktrace();         } catch (parserconfigurationexception e) {             // todo auto-generated catch block             e.printstacktrace();         } catch (saxexception e) {             // todo auto-generated catch block             e.printstacktrace();         }           log.d("count", " "+ getwrappedadapter().getcount());           return(getwrappedadapter().getcount()<100);         }          @override         protected void appendcacheddata() {           if (getwrappedadapter().getcount()<100) {             @suppresswarnings("unchecked")          msgadapter a=(msgadapter)getwrappedadapter();             for(string s:msg)           {               log.d("msg", s);           }            }         }       } 

i fixed error had logic of getcount() in custom adapter. fixing made code work perfectly.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -