Hello I need help on changing the text color of the action Bar the following is my style.xml.I need to change the text color to white including the settings icon.
You can simply put color to your strings like this:
<string name="app_name"><![CDATA[<b><font color=#FFFFFF>yebo</b>]]></string>
try this
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MyTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item>
</style>
<style name="MyTheme.ActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
</style>
<style name="MyTheme.ActionBar.TitleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">@color/red</item>
</style>
</resources>
Change in your style.
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
Add underneath line:
<item name="actionMenuTextColor">Your Color Here</item>
<item name="textColorPrimary">Your Color Here</item>
</style>
Hope it helps.
In your .axml put a RelativeLayout to add the actionbar. In here add a TextView with the property android:textColor="#FFFFFF". (#FFFFFF is white). As such:
<RelativeLayout
android:id="@+id/titleBarLinearLayoutFrontPage"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="55dp"
android:background="#696969">
<TextView
android:textColor="#FFFFFF"
android:id="@+id/txtActionBarText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="My Action Bar"
android:layout_gravity="center"
android:clickable="true"
android:layout_centerVertical="true"
android:textSize="22dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="60dp"
android:layout_centerHorizontal="true" />
</RelativeLayout>
Valus/styles.xml uses colors.xml file. When you press "control" and click @color/colorPrimary it shows you where colorPrimary comes. Which is colors.xml. In your colors.xml file you can edit it.
When you click the colour on the left it opens color palette. And you can change it easily.