package com.mycompany.myapp; import android.content.*; import android.view.*; public class mySurfaceView extends SurfaceView implements SurfaceHolder.Callback { public myThread t; public mySurfaceView(Context c) { super(c); getHolder().addCallback(this); } public void surfaceCreated(SurfaceHolder p1) { // TODO: Implement this method t=new myThread(getHolder()); t.start(); } public void surfaceChanged(SurfaceHolder p1, int p2, int p3, int p4) { // TODO: Implement this method } public void surfaceDestroyed(SurfaceHolder p1) { // TODO: Implement this method t.ok=false; } }