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
- 4,922
- 5
- 29
- 52
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,014
- 3
- 24
- 36