android - Cannot save previous data on a table with values -


public void move_to_another_fragment() {          fragment fragment = new itemfragment();         fragmentmanager fragmentmanager = getfragmentmanager();         getactivity().getactionbar().settitle("items");         fragmentmanager.begintransaction()                 .replace(r.id.frame_container, fragment).addtobackstack(null)                 .commit();      } 

i used above code move fragment b fragment a.in fragment have table data when come frgment , move frgmant b need show table previous value.can explain how start fragment b previous data

you can save data of fragment before changing fragment b. , in createview function of fragment b. use data saved fragment generate view of fragment b.

as activity same across both fragments, can store data in class variable of activity.

hope helps.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -