How to change size of title's text on Action Bar? How to change size of title's text on Action Bar? android android

How to change size of title's text on Action Bar?


Actually, you can do what you want to customize the ActionBar. It must be done through the Theme. You can do something like this :

<style name="Theme.YourTheme" parent="android:style/Theme">    <item name="android:actionBarStyle">@style/Theme.YourTheme.Styled.ActionBar</item></style><style name="Theme.YourTheme.Styled.ActionBar">    <item name="android:titleTextStyle">@style/Theme.Viadeo.Styled.YourTheme.TitleTextStyle</item></style><style name="Theme.YourTheme.Styled.ActionBar.TitleTextStyle" parent="@android:style/Widget.TextView">    <item name="android:textSize">12sp</item></style>


You could always do something like this:

ActionBar actionBar = getActionBar();actionBar.setTitle(Html.fromHtml("<small>YOUR TITLE</small>"));


on my system, res/styles AppTheme has a note saying

<!-- All customizations that are NOT specific to a particular API-level can go here. -->

and this is the style indicated in AndroidMainfest.xml. I added

<item name="android:textSize">15sp</item>

and it worked and I'd rather do this than a custom actionbar.