Is there way to make and Android background have different colored sides by using android:shape="rectangle"
? Right now I have it set but all the side of my view are the same color. Thanks very much.
Asked
Active
Viewed 785 times
3

matrix
- 3,000
- 3
- 24
- 35

Swifty McSwifterton
- 2,637
- 1
- 30
- 37
-
Look at [here](http://stackoverflow.com/questions/4941606/changing-gradient-background-colors-on-android-at-runtime). – Delimitry Jul 08 '11 at 18:22
1 Answers
0
You can use a gradient color to fill your shape, meaning one side will have one color and the other side will have another color, with the color blending between the two sides.
A way to have 4 sides with different colors is use a nine-patch drawable, this isn't a shape anymore.

coyotte508
- 9,175
- 6
- 44
- 63