Skip to content Skip to sidebar Skip to footer

Android App Label Color

I don't want to create any custom layout for app label, just want to change it's color to white (now it's black). How could I do that?

Solution 1:

styles.xml

<stylename="MyTheme"parent="@android:style/Theme.Holo"><itemname="android:actionBarStyle">@style/MyActionBar</item></style><stylename="MyActionBar"parent="@android:style/Widget.Holo.Light.ActionBar"><itemname="android:background">#FF9D21</item><itemname="android:titleTextStyle">@style/MyActionBarTitleText</item></style><stylename="MyActionBarTitleText"parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"><itemname="android:textColor">@color/red</item></style>

colors.xml

<?xml version="1.0" encoding="utf-8"?><resources><colorname="red">#FF0000</color></resources>

For more info

https://developer.android.com/training/basics/actionbar/styling.html#CustomText

Snap

enter image description here

Edit : For making it bold

<stylename="MyActionBarTitleText"parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"><itemname="android:textColor">@color/red</item><itemname="android:textStyle">bold</item></style>

Solution 2:

None of the previous answers worked for me, so I'm showing the one that worked in my case.

<stylename="AppThemeCustom"parent="Base.Theme.AppCompat.Light.DarkActionBar"><!-- Customize your theme here. --><itemname="colorPrimary">@color/primary</item><itemname="colorPrimaryDark">@android:color/black</item><itemname="colorAccent">@color/colorAccent</item><itemname="actionBarStyle">@style/MyActionBar</item><itemname="android:windowBackground">@android:color/white</item></style><stylename="MyActionBar"parent="@style/Widget.AppCompat.ActionBar"><itemname="android:titleTextStyle">@style/MyTitleTextStyle</item><!-- Support library compatibility --><itemname="titleTextStyle">@style/MyTitleTextStyle</item></style><stylename="MyTitleTextStyle"parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"><itemname="android:textColor">@android:color/black</item></style>

I wish if you find yourself in my situation this solution save your day. LOL

Solution 3:

You need to style the android:titleTextStyle in your ActionBar.

<stylename="MyActionBar"parent="@android:style/Widget.Holo.ActionBar"><itemname="android:titleTextStyle">@style/MyTextTitle</item></style><stylename="MyTextTitle"parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"><itemname="android:textColor">@color/white</item></style>

You can see this in Android Documentation: Customize the Text Color in ActionBar

Hope this helps.

Solution 4:

in styles.xml

<stylename="AppTheme.AppBarOverlay"parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

in toolbar

android:theme="@style/AppTheme.AppBarOverlay"

Post a Comment for "Android App Label Color"