Skip to content

Instantly share code, notes, and snippets.

@after-ephemera
Last active November 30, 2019 11:00
Show Gist options
  • Save after-ephemera/cf094c79726bab08b68f01dcc2e82a71 to your computer and use it in GitHub Desktop.
Save after-ephemera/cf094c79726bab08b68f01dcc2e82a71 to your computer and use it in GitHub Desktop.
class MyFragment: Fragment(){
companion object{
private val ARG_CAUGHT = "myFragment_caught"
fun newInstance(caught: Pokemon):MyFragment{
val args: Bundle = Bundle()
args.putSerializable(ARG_CAUGHT, caught)
val fragment = MyFragment()
fragment.arguments = args
return fragment
}
...
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment