简体   繁体   中英

How to add a custom title bar with an image as background in android studio

I have found several answers on here as to how to change the background color and add a custom icon to the title bar in android studio but am having difficulties finding an answer for how to use a custom image as the background instead of just a color in the title bar. Any help would be much appreciated. Thanks.

sadly you cannot add images as the background on both the header and textView/webView that's why you don't see any apps on android with image backgrounds. you could try using html instead of xml, like:

replace colors.xml, styles.xml, ect with colors.html, styles.html, ect

but i doubt that will work. hopefully they will add this feature later in the android sdk.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM