@Override public void surfaceCreated(SurfaceHolder holder) { super.surfaceCreated(holder); // load the model // this is done here, to assure the surface was already created, so that the preview can be // started // after loading the model if (model == null) { waitDialog = ProgressDialog.show(this, "", "loading...", true); waitDialog.show(); new ModelLoader().execute(); } }