Text after "div class =" itemprop = "text">
Why my list view does not update its user interface, when im removing just one item from my adapter, The display retains but the record has already been removed from my list adapter ..?
My delete item is working when maintaining more than one record from my adapter, but when I remove all items, I retain the last item I deleted from the UI.
Here the code I tried to do to refresh my UI not working, but still ... im using SimpleAdapter
case PaymentModeCollection .CHECK: // deletePaymentMode (arrListSet, paymentIdentity); Delete payment mode (ARR check, payment identity); // checkEditOrAdd = true; //arrCheck.remove(0); MyAdapter.notifyDataSetChanged (); //listView.refreshDrawableState (); //listView.invalidate (); // onPause (); //on resume(); break; Public, SpecialAdapter (context reference, from
Here is my deletePaymentMode
protected static void deletePaymentMode (ArrayList & lt ;? & gt; containerSetPaymentMode, string reference ) {/ Set & lt; ArrayList & LT ;? & Gt; & Gt; (ContainerSetPaymentMode.get (i) cash instanceof) {} if (containerSetPaymentMode.get (i) Check instance.org) {check tempCheck = (check) containerset payment mode.get (i); If (tempCheck.getxCheckNo (). ContentEquals (reference)) {Log D. (Tag, "item to be removed"); ArrCheck.remove (i); //break; }}} * / Iterator & lt ?? & Gt; IIA = ContainerSet PaymentMod.itator (); While (ia.hasNext ()) {Object Payment Object = ia.next (); If (cash item example of cash) {ArrayList & lt; Cash & gt; TempArr = (ArrayList & lt; cash & gt;) Payment Item; } And if (check of payment object installation) {check tempCheck = (check) payment object; If (tempCheck.getxCheckNo (). ContentEquals (reference)) {ia.remove (); break; } "itemprop =" text "> I do not know what your deletePaymentMode () but you always want to make changes (Add, delete, update) that holds your objects for your list view:
myListViewItems.remove (itemToRemove); MyAdapter.notifyDataSetChanged ();
This item must be sufficient to extract.
No comments:
Post a Comment