Search code examples
androidandroid-actionbaractionbarsherlocknine-patch

9 patch converted to gradient


I would like to have on my Android application an ActionBar with a bottom line. This line should looks like this with only 4 colors : What I want

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

This is the 9Patch I'm using. Do you know where I'm wrong, because I don't understand why :/

What I want

Thanks for your help !


Solution

  • You need to use an image like this one:

    enter image description here