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.
Asked
Active
Viewed 31 times
2 Answers
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