Hey everyone, currently I am facing an issue with the "new" Navigation Components? Whats the correct way to set different toolbar actions for different fragments while using a single activity. Currently I am using get/set methods in the activity to access the toolbar from each fragment and remove/set the correct menuitems. It works but seems wrong imo. Does anyone have any cleaner ways to solve this?
07/12/2019, 6:49 PM
What I do currently is use different toolbars in each fragment. This helps me to customise toolbars for each screen without much effort.
07/13/2019, 7:18 AM
Dont share it, it will only burn you in long run
07/15/2019, 5:57 AM
Thanks for the suggestion. Yeah I guess I have to refactor it as soon as I get some time and split the toolbars apart. Luckily I don't need many different toolbars yet.