When you register a toolbar with navigation architecture it will create an arrow allowing you to pop up on the fragment you are on.
On a few base level fragments I don't want to have the Hamburger menu icon nor the arrow but a custom view object.
How would I disable the back button from view?
I have tried manually disabling but am having a hard time finding out how to manage it with Navigation arch.
val supportActionBar = activity?.actionBar
if (supportActionBar != null) {
supportActionBar.setDisplayShowHomeEnabled(false)
supportActionBar.setDisplayHomeAsUpEnabled(false)
supportActionBar.setHomeButtonEnabled(false)
supportActionBar.setHomeAsUpIndicator(null)
}
Well after a good hour I hope that my pain and oversight really helps someone out. After Navigation Architecture forces you to load up a drawable into the navigation icon the only solution I came up with was to nullify it.
toolbar.navigationIcon = null