I am creating custom shapes for certain buttons but I want them to maintain the systems current color scheme. I thought that by not applying a gradient or color开发者_如何学编程 it would automagically take care of this for me but I am mistaken. By doing that I end up with a black button and black text.
Any pointers?
Obligatory code:
<shape android:shape="rectangle">
<corners android:radius="1dp" android:bottomRightRadius="0dp" android:bottomLeftRadius="7dp" android:topLeftRadius="0dp" android:topRightRadius="7dp" />
</shape>
Nope, those are actually png images with a Selector. You would need to use the same image in your selector, although you can imitate something close using the gradient APIs. When you change the background you lose the color scheme.
精彩评论