问题
I'm a new Android developer, and I'm just trying to improve my skill by reading some samples, I want to design a new interface using GridLayout, I've checked a lot of samples but I can't seem to draw borders between the GridLayout cells. What could I be missing?
Here is a link that I went through it, but the borders didn't show up!
http://developer.samsung.com/android/technical-docs/GridLayout-in-Android#
I appreciate your care in advance.
回答1:
Android Layout containers don't draw borders. Still:
You can set background of each cell's View to an xml Drawable resource, which describes a transparent rectangle with borders.
Give a background color to GridView's parent View, and set each GridView cell View's background to a different color.
Both of these can also be applied as a Style.
来源:https://stackoverflow.com/questions/13776547/gridlayout-with-borders