这个界面要实现的功能是通过摇一摇手机,生成对应的购彩号码。这时我们新建一个工具类Generatepackage com.utils; import java.util.LinkedList; import java.util.Random; import com.xiaoshi.lottery.R; public class Generate {	//根据彩票种类生成号码	public static String getNum(String kind) {	if (kind.equals("大乐透")) {	//getResult生()成1-35中的5个数字	return getResult(35, 5) + "+ " + getResult(12, 2);	}	if (kind.equals("七星彩")) {	Random rand = new Random();	String s = rand.nextInt(10) + " " + rand.nextInt(10) + " "	+ rand.nextInt(10) + " " + rand.nextInt(10) + " "	+ rand.nextInt(10) + " " + rand.nextInt(10) + " "	+ rand.nextInt(10);	return s;	}	if (kind.equals("排列三")) {	Random rand = new Random();	String s = rand.nextInt(10) + " " + rand.nextInt(10) + " "	+ rand.nextInt(10);	return s;	}	if (kind.equals("排列五")) {	Random rand = new Random();	String s = rand.nextInt(10) + " " + rand.nextInt(10) + " "	+ rand.nextInt(10) + " " + rand.nextInt(10) + " "	+ rand.nextInt(10) ;	return s;	}	if (kind.equals("双色球")) {	return getResult(33, 6) + "+ " + getResult(16, 1);	}	if (kind.equals("七乐彩")) {	return getResult(30, 7);	}	if (kind.equals("3D")) {	Random rand = new Random();	String s = rand.nextInt(10) + " " + rand.nextInt(10) + " "	+ rand.nextInt(10);	return s;	}	return "发生错误";	}	public static int getKindId(String kind) {	if (kind.equals("大乐透")) {	return 1;	}	if (kind.equals("七星彩")) {	return 1;	}	if (kind.equals("排列三")) {	return 1;	}	if (kind.equals("排列五")) {	return 1;	}	if (kind.equals("双色球")) {	return 0;	}	if (kind.equals("七乐彩")) {	return 0;	}	if (kind.equals("3D")) {	return 0;	}	return 0;	}	static String getResult(int total, int nums) {	// 用list来装载开奖号码	LinkedListlistNum = new LinkedList();	for (int i = 0; i