styles.xml
<resources>
<style name="CustomTheme" parent="Theme.AppCompat.Light">
<item name="android:actionBarStyle">@style/CustomBar</item>
<item name="actionBarStyle">@style/CustomBar</item>
</style>
<style name="CustomBar" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:background">@color/black</item>
<item name="android:src">@drawable/home</item>
<item name="background">@color/black</item>
<item name="src">@drawable/home</item>
</style>
</resources>
The Above code doesn't work as android:src
is not found, however i wish to achieve the intended effect of this.
I have a company logo that i want to use as the action bar main image, but don't want to use static image for full background colouring. The logo image, @drawable/home
has a transparent background.
How would i style the action bar to include an image as well as a background colour?
I don`t know that we have src, here is the code what worked for me: to set the image this is what I use:
Please find the whole code here: