I want to make a button background like this
So that when the content gets longer the background only gets stretched form the central region and the circular sides stay CIRCULAR.
I tried to make a 9-patch without a vertical stretch region but the circular sides went oval like in different sizes as you can see in the picture below.
when I specify a vertical stretch region in the center, the background becomes like this which I don't want it to. this is an square with rounded corners.
I also have to say that this background is basically a pink border which has a pink drop shadow both on the inside and the outside. I couldn't find a way to implement this with android drawable as there is no efficient way to have a good shadow effect using it
I can't think of a clean solution for doing so. please help me.
Alright, I just made a custom view that extends FrameLayout
and it has a customizable colored shadow and stroke.
You can also use it to draw an inner background in the center.
you can add it in your project from my GitHub page.