java - Want to update or refresh listview -



java - Want to update or refresh listview -

i have listview looking below

it 1 kind of radio based application

in when user tap on image asynctask called , music played , getting info replaced amit siddhpura text

below code

holder.imgplay.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { new metadatatask2().execute(holder.txtmetadata); } class streamholder { textview txtstreamname; textview txtstream; textview txtmetadata; imageview imgplay; }

and metadatatask2 class code below

class metadatatask2 extends asynctask<textview, void, icystreammeta> { string title_artist; textview txtview; @override protected com.example.xmlparsingex.icystreammeta doinbackground(textview... arg0) { txtview = arg0[0]; homecoming streammeta; } @override protected void onpostexecute(icystreammeta result) { seek { txtview.settext("hiiiiiiiiiii............"); mcobjectmetadata.cancel(); mcobjectmetadata = new mycountermetadata(10000, 1000); mcobjectmetadata.start(); **adapter.notifydatasetchanged(); mainlistview.setadapter(adapter); mainlistview.invalidate();** startservice(new intent(companieslist.this, notifyservice.class)); } grab (exception e) { e.printstacktrace(); } } @override protected void onpreexecute() { super.onpreexecute(); seek { pd = progressdialog.show(companieslist.this, "tuning...", "please wait..."); } grab (exception e) { e.printstacktrace(); } } }

but problem listview not updating means orange text displaying in listview not replacing hiiiiiii

if listview prefer alter textview in adapter's getview() method...or if list cursor backed in bindview().....i not sure method though.

java android listview

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -