In this tutorial I described how you can implement Up button in your App. This tutorial has been made with Kotlin language.
Navigation Graph tutorial has five parts, I have provided the completed project source code.If you face any problem you can find out from there.
Source code from Github...
https://github.com/shahsamir97/DemoNavigationGraph Android NavigationUI : Navigation Graph Part-3 : Android Options Menu
https://youtu.be/BaCWbQYe434