Draw类
package com.example.drawtestone;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.util.AttributeSet;
import android.view.View;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
public class Draw extends View{
//line paint
Paint paint = new Paint();
//x y axis paint
Paint paintPoint = new Paint();
//path paint
Paint paintPath = new Paint();
//x y axis unit
private float xUnit,yUnit;
//x y axis start
private float xStart,yStart;
//x y end start
private float xEnd,yEnd;
public Draw(Context context) {
super(context);
}
public Draw(Context context,AttributeSet attrs) {
super(context,attrs);
// TODO Auto-generated constructor stub
}
@Override
protected void onDraw(Canvas canvas