I am new in android, want to show border in ta开发者_如何学运维blelayout.
can any one please help me, it is very critical for me.
Try setting a ShapeDrawable
as the background of the elements you want a border on. You can define a ShapeDrawable in an XML file in your res/drawables folder. In particular, the stroke
element has the dashWidth
and dashGaps
parameters that let you make a dashed line:
<stroke
android:width="integer"
android:color="color"
android:dashWidth="integer"
android:dashGap="integer" />
You can also just set a repeating dots image as the background of the entire table, then set a solid background and margin on the cells (see this trick, which is written about solid borders but I'm sure you can fake with a 2x2 repeating bitmap of a checkerboard pattern).
精彩评论