Sushant
Sushant

Reputation: 1874

Add image on center of action bar without using custom view?

I want to add an image to the center of an action bar. I want to use the default Android API for actionbar, because I'd like to avoid creating my own customView. How is this done?

Upvotes: 0

Views: 321

Answers (1)

Nathan Walters
Nathan Walters

Reputation: 4136

If you use the new Toolbar widget from the support library, you can treat it like a standard layout and add any custom views you want in your XML layout file.

Here's an excellent blog post that includes information about using the Toolbar: https://chris.banes.me/2014/10/17/appcompat-v21/

Upvotes: 1

Related Questions