/** * This is called immediately after the surface is first created. Implementations of this should * start up whatever rendering code they desire. Note that only one thread can ever draw into a * {@link Surface}, so you should not draw into the Surface here if your normal rendering will be * in another thread. * * @param holder The SurfaceHolder whose surface is being created. */ @Override public void surfaceCreated(SurfaceHolder holder) { Rect surface = holder.getSurfaceFrame(); width = surface.width(); height = surface.height(); x = width / 2; y = circleRadius; loop = new Loop(this); loop.isRunning(true); loop.start(); }
/** * This is called immediately after the surface is first created. Implementations of this should * start up whatever rendering code they desire. Note that only one thread can ever draw into a * {@link Surface}, so you should not draw into the Surface here if your normal rendering will be * in another thread. * * @param holder The SurfaceHolder whose surface is being created. */ @Override public void surfaceCreated(SurfaceHolder holder) { Rect surface = holder.getSurfaceFrame(); width = surface.width(); height = surface.height(); x = width / 2; y = circleRadius; loop = new Loop(this); loop.isRunning(true); loop.start(); Log.d("ANAS", "++++++++++++++SURFACE CREATED LOOP: " + loop.getState()); }