package com.annimon.jecp.android;

import android.app.Activity;
import android.os.Bundle;
import com.annimon.jecp.ApplicationListener;

public abstract class JecpMainActivity extends Activity implements ApplicationListener {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        onStartApp();
    }

    @Override
    protected void onPause() {
        super.onPause();
        onPauseApp();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        onDestroyApp();
    }
    
}

@@ -354,19 +354,126 @@
     
-onStartApp(
+final JecpSurfaceView view = new JecpSurfaceView(this);%0D%0A        view.setFocusable(true);%0D%0A        setContentView(view
 );%0D%0A
@@ -540,21 +540,18 @@
     
-super.
 onPause
+App
 ();%0D
@@ -555,34 +555,37 @@
 );%0D%0A        
+super.
 onPause
-App
 ();%0D%0A    %7D%0D%0A
@@ -643,22 +643,16 @@
         
-super.
 onDestro
@@ -652,16 +652,19 @@
 nDestroy
+App
 ();%0D%0A   
@@ -660,32 +660,38 @@
 App();%0D%0A        
+super.
 onDestroyApp();%0D
@@ -675,35 +675,32 @@
  super.onDestroy
-App
 ();%0D%0A    %7D%0D%0A    

Add SurfaceView to Activity