https://kotlinlang.org logo
#android-architecture
Title
# android-architecture
w

woodii

07/11/2019, 1:39 PM
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?
p

pavi2410

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.
u

ursus

07/13/2019, 7:18 AM
Dont share it, it will only burn you in long run
w

woodii

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.