Skip to content

Instantly share code, notes, and snippets.

@laramartin
Created March 9, 2019 17:26
Show Gist options
  • Save laramartin/b4d6101412bcedfb09d1f4d5f784ef8a to your computer and use it in GitHub Desktop.
Save laramartin/b4d6101412bcedfb09d1f4d5f784ef8a to your computer and use it in GitHub Desktop.
private fun displayMasterDetailLayout(view: View) {
val navHostFragment =
childFragmentManager.findFragmentById(R.id.profile_nav_container) as NavHostFragment
view.findViewById<TextView>(R.id.account_textview).setOnClickListener {
navHostFragment.navController.navigate(R.id.fragment_account)
}
view.findViewById<TextView>(R.id.notifications_textview).setOnClickListener {
navHostFragment.navController.navigate(R.id.fragment_notifications)
}
view.findViewById<TextView>(R.id.settings_textview).setOnClickListener {
navHostFragment.navController.navigate(R.id.fragment_settings)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment