Created
April 14, 2019 15:19
-
-
Save codingpizza/2022ca87afa6bd8b9566670afde66b76 to your computer and use it in GitHub Desktop.
Receiving the data from one Fragment using safeArgs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
super.onViewCreated(view, savedInstanceState) | |
arguments?.let{ | |
//Using SafeArgs | |
val drawableId = DetailFragmentArgs.fromBundle(it).drawableId | |
ivAnimal?.setImageResource(drawableId) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment