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 775 times
3
matrix
- 2,860
- 3
- 23
- 35
Swifty McSwifterton
- 2,597
- 1
- 29
- 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
- 8,277
- 5
- 40
- 60