Skip to content

Instantly share code, notes, and snippets.

@adfleshner
Last active April 9, 2022 04:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adfleshner/7eeb5ce55b7dcca1c201d0fe4a4edbe9 to your computer and use it in GitHub Desktop.
Save adfleshner/7eeb5ce55b7dcca1c201d0fe4a4edbe9 to your computer and use it in GitHub Desktop.
The Easy way you can pass data into a bundle
data class User(val name:String, val age:Int) : Serializable
...
//Now you can add it as a single line into the bundle.
val b2 = Bundle().apply{
putSerializable("user",User(name, age))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment