0

How can I change the background of the action bar in my app to a image from the drawable folder? It would be nice if you could tell me in which code goes to which file.

Validor
  • 71
  • 3
  • 7
  • have a look [here](http://stackoverflow.com/questions/23155637/change-background-color-of-the-action-bar-using-appcompat/23156002#23156002) – Blackbelt Oct 10 '15 at 17:58

2 Answers2

0

Add this property in your toolbar:

 android:background="@drawable/yourImage"
Michele Lacorte
  • 5,323
  • 7
  • 32
  • 54
0

You can set background of your action bar as simple as that:

    <android.support.v7.widget.Toolbar
        android:id="@+id/your_app_bar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@drawable/your_drawable" />
Ivan V
  • 3,024
  • 4
  • 26
  • 36