Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Anaglyph extends SurfaceView implements SurfaceHolder.Callback{
- public Anaglyph(Context context) {
- super(context);
- getHolder().addCallback(this);
- thread = new MainThread(getHolder(), this);
- setFocusable(true);
- loading_screen = BitmapFactory.decodeResource(getResources(),R.drawable.loading_screen);
- }
- @Override
- public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
- }
- @Override
- public void surfaceCreated(SurfaceHolder arg0) {
- thread.setRunning(true);
- thread.start();
- }
- @Override
- public void surfaceDestroyed(SurfaceHolder arg0) {
- boolean retry = true;
- while(retry){
- try{
- thread.join();
- retry=false;
- }catch(InterruptedException e){}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement