android - HtmlHelper library in java - source not found -
help me please found error in java-method onitemclick. when comment code in try-catch construction - programme runs, in otherwise - programme crashes error "source not found". prefer, error starts hh = new htmlhelper(new url((string) url)) string.
@override public void onitemclick(adapterview<?> adapter, view view, int position, long arg) { string stringdata; intent intent = new intent(stackparser.this, availablecontent.class); url = (string) murls.get(output.get(position)); toast.maketext(getapplicationcontext(), url, toast.length_short).show(); htmlhelper hh; seek { hh = new htmlhelper(new url((string) url)); timeunit.seconds.sleep(5); list<tagnode> links = hh.getlinksbyclass("texts"); iterator<tagnode> iterator = links.iterator(); iterator.hasnext(); tagnode divelement = (tagnode) iterator.next(); stringdata = divelement.gettext().tostring(); if(!stringdata.equals("")) { intent.putextra("send content-activity", stringdata); startactivity(intent); finish(); } else { intent.putextra("send content-activity", "empty"); startactivity(intent); finish(); } } grab (malformedurlexception e) { toast.maketext(getapplicationcontext(), "1", toast.length_short).show(); // todo auto-generated grab block e.printstacktrace(); } grab (ioexception e) { toast.maketext(getapplicationcontext(), "2", toast.length_short).show(); // todo auto-generated grab block e.printstacktrace(); } grab (interruptedexception e) { e.printstacktrace(); } } });
java android eclipse
No comments:
Post a Comment