Skip to content

Instantly share code, notes, and snippets.

@after-ephemera
Created July 13, 2017 15:57
Show Gist options
  • Save after-ephemera/785ad31cd5c8ec96dac5d4c01e581c2c to your computer and use it in GitHub Desktop.
Save after-ephemera/785ad31cd5c8ec96dac5d4c01e581c2c to your computer and use it in GitHub Desktop.
public class MyFragment extends Fragment {
private static final String ARG_CAUGHT = "myFragment_caught";
public static MyFragment newInstance(Pokemon caught) {
Bundle args = new Bundle();
args.putSerializable(ARG_CAUGHT, caught);
MyFragment fragment = new MyFragment();
fragment.setArguments(args);
return fragment;
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment