I am editing the style xml trying to get the Activity title bold.
<style name="MyTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">#81CFEB</item>
<item name="android:textStyle">bold</item>
</style>
But only what I can set is the background color desired. I do not why the textStyle is not set to bold.
Anyone know how to solve it?
Can you please try with this:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MyTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/MyTheme.MyActionBar</item>
</style>
<style name="MyTheme.MyActionBar"parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:titleTextStyle">@style/MyTheme.MyActionBar.TitleTextStyle</item>
</style>
<style name="MyTheme.MyActionBar.TitleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:background">#81CFEB</item>
<item name="android:textStyle">bold</item>
</style>
</resources>
For those using AppCompat, you'll need something like this:
<style name="MyTheme" parent="Theme.AppCompat">
<item name="android:actionBarStyle">@style/MyTheme.ActionBar</item>
<item name="actionBarStyle">@style/MyTheme.ActionBar</item>
</style>
<style name="MyTheme.ActionBar" parent="Widget.AppCompat.ActionBar.Solid">
<item name="titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
</style>
<style name="MyTheme.ActionBar.TitleTextStyle" parent="TextAppearance.AppCompat">
<item name="android:background">#81CFEB</item>
<item name="android:textStyle">bold</item>
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With