android - ListView does not update anymore after deletion of the first ListView child -



android - ListView does not update anymore after deletion of the first ListView child -

i'm having problem listview developed. if remove first kid of listview. other childs don't update anymore.

if delete lastly child, childs in middle keeps on updating. delete first kid of listview, every kid stops updating.

the listview still clickable.

listview creation:

listview.setadapter(madapter = new arrayadapter<progress>(getactivity(), r.layout.progressbar_list, r.id.textview, a){ @override public view getview(int position, view convertview, viewgroup parent) { view v = super.getview(position, convertview, parent); upadterow(getitem(position), v, position, 500); homecoming v; } });

add elements:

public static void additems(view v, context ctx){ madapter.add(new progress()); madapter.notifydatasetchanged(); ctx.stopservice(intent); intent = new intent(ctx, downloadingservice.class); intent.putextra("files", madapter.getcount()); ctx.startservice(intent); }

remove items:

act.runonuithread(new runnable() { @override public void run() { tasks.remove(clicked_position); a.remove(a.get(clicked_position)); //madapter.remove(a.get(clicked_position)); madapter.notifydatasetchanged(); clicked_position = 500; log.e("removed", "" + a.size() + " listview " + listview.getcount() + " mlistview " + mlistview.getcount()); } });

maybe guys, can give me hints cause of problem coud be.

android listview android-arrayadapter

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -