Code example for SurfaceHolder

Methods: addCallback, getSurface, isCreating

0
		// register our interest in hearing about changes to our surface 
		holder = getHolder();
		if (holder == null) {
			Log.d("xiaoe", "holder == null.");
		} 
		holder.addCallback(this);
 
		Surface surface = holder.getSurface();
		if (surface == null) {
			Log.d("xiaoe", "surface == null.");
		} else { 
			Log.d("xiaoe", "surface.isValid: " + surface.isValid());
			Log.d("xiaoe", "holder.isCreating: " + holder.isCreating());
		} 
 
		setFocusable(true);
 
		try { 
			core = new LrcBackground(this);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block