Difference between ActionBar and Top Bar with NavigationUI

A few months ago I started an app and the only information on how to use the Actionbar was here


Now.. this worked perfectly. I have never had any problems and I was actually really happy with it. But… after coming back to the app making scene I see this now…


What is the difference between the two and which should I use? The only think I can see that’s different is that the topbar using NavigationUI implements a backstack and the ability to follow a Navigation Graph. But… is there some other reason that using topBar with NavigationUI would be preferred to just a plain old actionbar? They both seem to implement toolbar to do their job. I’m just not seeing a big difference between the two.