How to set bold title in Action Bar?

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 name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">#81CFEB</item>
    <item name="android:textStyle">bold</item>

But only what I can set is the background color desired. I do not why the textStyle is not set to bold.

  • How to disable an item in a Spinner
  • Android Manifest- intent filter and activity
  • How to connect via HTTPS using Jsoup?
  • How to make a nested Json object in Java?
  • Android Google Analytics connection to service failed
  • Android: get system default activity transition animations
  • Anyone know how to solve it?

    Related posts:

    How to unregister BroadcastReceiver
    Changing the background color of a Tab in TabLayout (Android design support library) doesn&#039;...
    Android How to queue multiple intents on an IntentService
    Android Shared Preferences
    Convert png images to 9 patch in Android Studio
    How to show my current location in Google Map Android using google API client
  • What does FragmentManager and FragmentTransaction exactly do?
  • Android - Access file from assets \ PDF display
  • GreenRobot EventBus error in fragments: No subscribers registered for event class
  • Fatal Exception: java.lang.NoClassDefFoundError: rt
  • Android List with section headers
  • Which Android Data Storage Technique to use?
  • 3 Solutions collect form web for “How to set bold title in Action Bar?”

    Can you please try with this:

    <?xml version="1.0" encoding="utf-8"?>
      <style name="MyTheme" parent="@android:style/Theme.Holo.Light">
        <item name="android:actionBarStyle">@style/MyTheme.MyActionBar</item>
      <style name="MyTheme.MyActionBar"parent="@android:style/Widget.Holo.Light.ActionBar">
        <item name="android:titleTextStyle">@style/MyTheme.MyActionBar.TitleTextStyle</item>
      <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>

    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 name="MyTheme.ActionBar" parent="Widget.AppCompat.ActionBar.Solid">
        <item name="titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
    <style name="MyTheme.ActionBar.TitleTextStyle" parent="TextAppearance.AppCompat">
        <item name="android:background">#81CFEB</item>
        <item name="android:textStyle">bold</item>

    if (Build.VERSION.SDK_INT >= 24) {getSupportActionBar().setTitle(Html.fromHtml(“” + title + ““, 0));}
    else {getSupportActionBar().setTitle(Html.fromHtml(“” + title + ““));}

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.