Created
December 4, 2020 14:31
-
-
Save DDihanov/9fb7aadedc93304c9b0f49a5cb80ab14 to your computer and use it in GitHub Desktop.
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 MainActivity : AppCompatActivity(), ToFlowNavigatable { | |
private val navigator: Navigator = Navigator() | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
val navView: BottomNavigationView = findViewById(R.id.nav_view) | |
val navController = findNavController(R.id.nav_host_fragment) | |
navigator.navController = navController | |
navView.setupWithNavController(navController) | |
} | |
override fun navigateToFlow(flow: NavigationFlow) { | |
navigator.navigateToFlow(flow) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment