Closed francescogatto closed 3 years ago
I found a solution, i changed the method to accept a "FallBack" onDrawerItemClickListener.. like this:
slider.setupWithNavController(findNavController(R.id.nav_host_fragment), fallBackListener!!)
good idea. would you like to open a PR with this improvement to the project?
Sure!
Closing this ticket for inactivity, that being said, we'd still love to improve this behavior.
Sorry for the late, i'm working on this and soon a pull request!
@mikepenz Pull request sent
Hi!
I'm having some troubles with
onDrawerItemClickListener
and Navigation Components. It works nice with NavigationDrawerItems, but what if i need to have a callback on a simple PrimaryDrawerItem? I tried to useslider?.onDrawerItemClickListener = { v, drawerItem, position ->
withslider.setupWithNavController(findNavController(R.id.nav_host_fragment))
, but the last one disable the first one.Thanks!
[ ] Used library version 8.1.7 [ ] Used support library version androidx [ ] Used gradle build tools version [ ] Used tooling / Android Studio version 4.1