Created
November 5, 2022 21:21
-
-
Save k0siara/253123d26405f3506041bfe4442c3699 to your computer and use it in GitHub Desktop.
HomeFragment.kt
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
class HomeFragment : Fragment(R.layout.home_fragment) { | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
super.onViewCreated(view, savedInstanceState) | |
findNavController() | |
.currentBackStackEntry | |
?.savedStateHandle | |
?.getLiveData<String>("my-result-key") | |
?.observe(viewLifecycleOwner) { result -> | |
// Do something with the result. | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment