Created
July 1, 2020 22:31
-
-
Save cengiztoru/286d527d5acc288fb0043a3a8da70875 to your computer and use it in GitHub Desktop.
Navigation Architectural Components - Getting Passed Data
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
lateinit var user: User | |
val args: HomeFragmentArgs by navArgs() | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
user = args.user | |
} | |
override fun onCreateView( | |
inflater: LayoutInflater, container: ViewGroup?, | |
savedInstanceState: Bundle? | |
): View? { | |
// Inflate the layout for this fragment | |
return inflater.inflate(R.layout.fragment_home, container, false) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment