9 patch converted to gradient

I would like an ActionBar with a bottom line on my Android app. This line should look with about 4 colors:What i want

To get this effect, I use 9patch, but instead of showing 4 colors, it replaces it with a gradient: What i get

This is the 9Patch that I am using. You know where I am wrong because I do not understand why: /

What i want

Thank you for your help!

+5
source share
2 answers

You need to use an image like this:

enter image description here

+3
source

Try editing your 9-patch so that instead of blocks with a size of 1 pixel make them 3 wide, where only the middle pixel is marked as expandable. This can give you what you need.

, , , 9-, , . 9- , , .

+2

All Articles