is the drawing of a single rectangular box
Canvas.drawrect (
Left,//distance from the Ieft
Top,//the distance of the bottom distance of the Surfaceview from the rectangle
Right,//rectangle to the left of the Surfaceview distance
Bottom,//rectangle of the top distance Surfaceview the top of the distance, so here is generally used top-height, is the top of the rectangle directly minus the length of the rectangle, you get the length of the rectangle
Paint);
The following is the drawing of a continuous rectangle
for (int i = 0; i < 3; i++) {
+ i * Leftdis, the distance from the left side of each rectangle box , the distance from the top of the bottom distanceleft + i * leftdis+width, right margin distance The width of the rectangle is equal to the breadth, this width must be less than Leftdis, so that the rectangle will not coincide, width and Leftdis is the difference between the rectangular box spacing 100-10, the top distance from the top of the paint);
}
Surfaceview Draw Rectangle DrawRect