0

I'm trying to style the action bar inside my app using the code below.

 <resources>
<!-- the theme applied to the application or activity -->
<style name="myTheme" parent="@style/Theme.AppCompat">
    <item name="android:actionBarStyle">@style/MyActionBar</item>
    <item name="actionBarStyle">@style/MyActionBar</item>

</style>

<!-- ActionBar styles -->
<style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar">

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

</style>

simply put the font should be bigger.. but nope.

Any ideas as to why?

Thanks.

1 Answers1

0

Possibly your theme is not applied to activity. Set it in manifest:

    <activity
        android:name=".YourActivty"
        android:theme="@style/myTheme" />

UPDATE 1

You should change action bar text size in such way (changing titleTextStyle):

<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">24sp</item>
</style>
kandi
  • 1,098
  • 2
  • 12
  • 24