Just go to res/values/styles.edit the xml file to change the color of action bar. Code for styles.
You can add a style to your styles.xml,
<style name="ToolbarTheme" parent="@style/ThemeOverlay.AppCompat.ActionBar">
<!-- Customize color of navigation drawer icon and back arrow -->
<item name="colorControlNormal">@color/toolbar_color_control_normal</item>
</style>
and add this as theme to your toolbar in toolbar layout.xml using app:theme, check below
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:theme="@style/ToolbarTheme" >
</android.support.v7.widget.Toolbar>
use this style
<style name="Theme.MyFancyTheme" parent="android:Theme.Holo">
<item name="android:homeAsUpIndicator">@drawable/back_button_image</item>
</style>
Here is the simplest way of achieving Light and Dark Theme for Toolbar.You have to change the value of app:theme
of the Toolbar tag
app:theme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/ThemeOverlay.AppCompat"
Use this:
<style name="BaseTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorControlNormal">@color/white</item>
</style>
For white Toolbar Title and White Up arrow, use following theme:
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
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