嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元微信扫码支付:2 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
界面均为自己绘图画出来的,可以参看学习一下绘图基本方法
for (int i = 0; i < 7; i ) {
for (int j = 0; j < 7; j ) {
Paint.FontMetrics fontMetrics = paint.getFontMetrics();
float fontHeight = fontMetrics.bottom - fontMetrics.top;
switch (currentMonth.get(i * 7 j).stateOfDay)
{
case 0://大姨妈来了的日子
paint.setColor(0xFFFF3030);
break;
case 1://安全期
paint.setColor(0xFF9ACD32);
break;
case 2://危险期
paint.setColor(0xFFEEEE00);
break;
default:
break;
}
canvas.drawRect(gridWidth * j 1 ,gridHeight * i 1,gridWidth * (j 1) - 1,gridHeight * (i 1) - 1,paint);
if (currentMonth.get(i * 7 j).HasMakeLove)
{
paint.setColor(0XFF9932cc);
canvas.drawRect(gridWidth * j 3 ,gridHeight * i (float)(gridHeight * 0.8),gridWidth * (j 1) - 3,gridHeight * (i 1) - 6,paint);
}
//绘制日期文字
if (MMFormat.format(currentMonth.get(i * 7 j).date).equals(MMFormat.format(ViewDate)))
{
paint.setColor(0xFF000000);
}
else
{
paint.setColor(0xFF888888);
}
canvas.drawText(ddFormat.format(currentMonth.get(i * 7 j).date), (float) (gridWidth * (j 0.5)), (float) (gridHeight * (i 0.5)), paint);
}