So, I have an Activity that grabs "Locations" from a server and shows the user the Location's details in a ListView. I also have an Activity that places all of these Locations onto a Google Map. All is well. Now, I want to place these into a ViewPager with tabs. To do so, I have converted them both to fragments. When I was using activities, I sent an ArrayList using Intent from the ListActivity to the MapActivity to plot the points.
My question is: now that I am using fragments, how can I send an ArrayList from one fragment to another? I was using Intent, but can no longer use this method since I won't be starting a new activity. I could retrieve all of the data again from the server but I do not wish to use this method as it shouldn't be necessary. Also, the data in the ListView will grow as the user scrolls, so every time data is fetched, I need to update it on the other fragment.
Any ideas on how I can send an ArrayList to another activity and update it right after? Thanks.