private
void
drawFrame(Canvas canvas){
calculateLeft();
//绘制横线
for
(
int
i=
0
;i<=xLineCount;i++){
float
startY=i*xInterval+xInterval;
canvas.drawLine(left+
5
, startY,getWidth(),startY,paintLine);
textPaint.setTextAlign(Align.RIGHT);
canvas.drawText(Math.round(xMaxValue/xLineCount*(xLineCount-i)-
0.5
)+
""
,left,startY+bottom/
4
, textPaint);
}
for
(
int
j=
0
;j<ylinecount;j++){
float
=
""
leftspace=
"yInterval*j+left+5;"
canvas.drawline(leftspace,=
""
bottom,leftspace,
this
.getheight()-bottom,paintline);=
""
textpaint.settextalign(align.center);=
""
if
(j=
"=0){"
continue
;=
""
}=
""
xpoint.add(leftspace);=
""
canvas.drawtext(defaultday[j-
1
],leftspace,
this
.getheight(),=
""
textpaint);=
""
}<=
""
pre=
""
>
</ylinecount;j++){>
转载于:https://blog.51cto.com/tongfu1013/1678258