With the new Lollipop API, we have to use a Toolbar if we want to personalize the action bar aspect.
Adding a ProgressBar to the Toolbar is as simple as adding it to
A workaround to create the layout completely in xml would be replacing the toolbar content with your own relative layout. To do that, you need to fake the activity title (and also the navigation icon if you are using one), which is literally nesting the following in your Toolbar block.
Note that 20sp sans-serif-medium is the font used in lollipop toolbar, you might need to adjust the text view parameters to make it look natural in earlier versions.