I want to send some Data from a fragment to a new fragment. I know this can be done with a bundle but I don't know how to use them, especially not with my own objects.
I replace my old fragment with a new one like this:
Fragment newFragment = new SecondFragment();
FragmentTransaction transaction = getFragmentManager().beginTransaction();
transaction.replace(R.id.frame_container, newFragment);
transaction.addToBackStack("saveState");
transaction.commit();
So now I want to send this Data to the "newFragment".
private List<MyObject> objectList;
How can I put this objectList to a new Bundle?
EDIT:
And also, how can I send the bundle from my old fragment to the newFragment?