Android show single item from a list in next page -


i new android , developing mail application. in application, json string server creating list ( creating rows in table view, embedded in scroll view ). trying show single item in detail on clicking item.

on click, getting id of corresponding item , load new page using following page. code looks like

intent intent = new intent(firstactivity.this, secondactivity.class); bundle b = new bundle(); b.putint("id", 124);  b.putint("message", "message"); intent.putextras(b);  startactivity(intent); finish(); 

but problem listing page cleared on return page.

ie, on click delete button in child page, want delete same item in list page also. after deleted item child page, using code redirect parent page.

intent intent = new intent(secondactivity.this, firstactivity.class); bundle b = new bundle(); b.putint("id", 124);  intent.putextras(b);  startactivity(intent); finish(); 

how delete single item out page refresh if coming child view , load fresh page if coming directly.

thank time please in advance

well remove desired item list using remove() method of arrayadapter.

a possible way be:

object toremove = arrayadapter.getitem([position]); arrayadapter.remove(toremove); 

another way modify arraylist , call notifydatasetchanged() on arrayadapter.

arraylist.remove([index]); arrayadapter.notifydatasetchanged(); 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -