Read complete story

Changing text size and style in action bar

Like me , I guess many of us want to show a different size and styled text in action bar. If you are using ToolBar its fairly easy but for all those old projects that still have Android’s action bar its a pretty hard work. But you can achieve this with the help of CustomView. Yes you can add a CustomView to your action bar. Apply your style on this custom view and add it to the action bar.

So lets create an example, here I want my Action bar title with center gravity and textSize of 15sp.

And its done. But be careful as after this non of your setTitle() function will change the Title of your activity.

UI
. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close