Hi Erel
I know that; but if I want a
gradient background and set the panel to
GradientDrawable in the designer the border option disappears. I didn't believe it at first, I thought I was dreaming. But that's what happens. I just wanted to understand why that is. I would have thought that as an object can have it's own built-in border with a solid color it should do the same with a gradient color. It's only the color fill of the object that is being changed so why can't it "keep" it's border.
So you have to add another panel which had
solid color with an alpha of
zero with a rounded rectangle border. Doing this manually or in the code takes time to do; something that would take ten seconds in the designer. If you have different types of views to maintain consistency across the app you have to do the following with every one of them.
- Create panel to hold the view with GradientDrawable - to get a gradient background
- The view itself i.e. spinner, editbox, label
- A solid color alpha zero - panel to provide the rounded rectangle border.
This is magnum tedious.
I have attached a screen shot of a toolbar with and without the border panel.
I guess the question I have is is it worth me putting a wish for this in the wish list or is it just not possible to have a GradientDrawable with a border and rounded corners?
Best regards
Rob