如上为手机效果图,我的最多支持五点触摸
首先,写一个关于圆属性的JAVA类(Circle)
package com.example.y2_android19_pointstouch;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import java.util.Random;
/**
* Created by Administrator on 2017/7/9 0009.
*/
public class Circle {
public float x;//圆的圆心坐标x
public float y;//圆的圆心坐标y
public int r=80;//圆的半径
public int pointId;//手指的Id
//三原色:红,绿,蓝
int red;
int green;
int blue;
Random random=new Random();//手指按下随机三原颜色
//构造函数
public Circle(float x, float y, int pointId) {
this.x = x;
this.y = y;