Search code examples
androidcssuser-interfacebitmaptile

expanding context menu approach


I have a bitmap like this one below:

contextmenu

I need to expand it horizontally, as needed, as well as vertically, with the ">" part remaining at the vertical center. I know for certain CSS border image can't handle this, I am uncertain about 9-patch, but I think it would fail too and I can't use SVG. Is implementing my custom "mxn patch" image specification the only option?


Solution

  • A 3x5 = 15 custom patch specification did it for me. Android's 9 patch, nor CSS3 border-image, solve every problem. Custom N patch solutions are sometimes needed.