android - Update listview - single row - chat from sqlite -
how can update row in listview (a chat) ?
is easy make customadapter = new (..), if have 50000 message? slow make = new "always"
how update "x" row?
i try adaptermessages.notifydatasetchanged();
, not update, normal, don't know row listview
example :
user1 : hi user2 : hi? (update here) row "x" user1: hello user2: aa ok (update here) row "x"
i use adapter update listview, (message receiv or not receiv) http://fielinks.com/sites/default/files/styles/large/public/images/double-check-whatsapp.jpg?itok=qbi0lgql
listview = (listview)rootview.findviewbyid(r.id.listview1); listdata= getcalldetails(); listview.setadapter(new customadapter(getactivity().getbasecontext(),listdata)); listview.setonitemclicklistener(new onitemclicklistener() { @override public void onitemclick(adapterview<?> arg0, view arg1, int positiontoremove, long arg3) { updatefromdb(id); listdata.remove(positiontoremove); adapter.notifydatasetchanged(); }
Comments
Post a Comment