diff --git a/cocos2d-android/.gitignore b/cocos2d-android/.gitignore
index 7d40e1a..bf88b5e 100644
--- a/cocos2d-android/.gitignore
+++ b/cocos2d-android/.gitignore
@@ -1,3 +1,4 @@
.idea/
local.properties
+/.classpath
diff --git a/cocos2d-android/build.properties b/cocos2d-android/ant.properties
similarity index 90%
rename from cocos2d-android/build.properties
rename to cocos2d-android/ant.properties
index edc7f23..b0971e8 100644
--- a/cocos2d-android/build.properties
+++ b/cocos2d-android/ant.properties
@@ -1,6 +1,6 @@
# This file is used to override default values used by the Ant build system.
-#
-# This file must be checked in Version Control Systems, as it is
+#
+# This file must be checked into Version Control Systems, as it is
# integral to the build system of your project.
# This file is only used by the Ant script.
diff --git a/cocos2d-android/build.xml b/cocos2d-android/build.xml
index a363058..b7b2602 100644
--- a/cocos2d-android/build.xml
+++ b/cocos2d-android/build.xml
@@ -2,77 +2,91 @@
-
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/cocos2d-android/default.properties b/cocos2d-android/default.properties
deleted file mode 100644
index 01c3b46..0000000
--- a/cocos2d-android/default.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system use,
-# "build.properties", and override values to adapt the script to your
-# project structure.
-
-android.library=true
-# Indicates whether an apk should be generated for each density.
-split.density=false
-# Project target.
-target=android-7
-
diff --git a/cocos2d-android/libs/cocos2d-android.jar b/cocos2d-android/libs/cocos2d-android.jar
deleted file mode 100644
index 79f933b..0000000
Binary files a/cocos2d-android/libs/cocos2d-android.jar and /dev/null differ
diff --git a/cocos2d-android/libs/cocos2d-android.jardesc b/cocos2d-android/libs/cocos2d-android.jardesc
deleted file mode 100644
index f33aa47..0000000
--- a/cocos2d-android/libs/cocos2d-android.jardesc
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/cocos2d-android/proguard-project.txt b/cocos2d-android/proguard-project.txt
new file mode 100644
index 0000000..f2fe155
--- /dev/null
+++ b/cocos2d-android/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/cocos2d-android/project.properties b/cocos2d-android/project.properties
new file mode 100644
index 0000000..33ae556
--- /dev/null
+++ b/cocos2d-android/project.properties
@@ -0,0 +1,17 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+android.library=true
+# Indicates whether an apk should be generated for each density.
+split.density=false
+# Project target.
+target=android-16
diff --git a/cocos2d-android/src/org/cocos2d/opengl/CCGLSurfaceView.java b/cocos2d-android/src/org/cocos2d/opengl/CCGLSurfaceView.java
index 0c57091..e320b09 100644
--- a/cocos2d-android/src/org/cocos2d/opengl/CCGLSurfaceView.java
+++ b/cocos2d-android/src/org/cocos2d/opengl/CCGLSurfaceView.java
@@ -6,6 +6,7 @@
import android.app.Activity;
import android.content.Context;
+import android.util.AttributeSet;
import android.view.MotionEvent;
public class CCGLSurfaceView extends GLSurfaceView {
@@ -17,40 +18,48 @@ public class CCGLSurfaceView extends GLSurfaceView {
public CCGLSurfaceView(Context context) {
super(context);
+ init(context);
+ }
+
+ public CCGLSurfaceView(Context context, AttributeSet attrs){
+ super(context, attrs);
+ init(context);
+ }
- CCDirector.theApp = (Activity) context;
+ private void init(Context context) {
+ CCDirector.theApp = (Activity) context;
- mDispatcher = CCTouchDispatcher.sharedDispatcher();
+ mDispatcher = CCTouchDispatcher.sharedDispatcher();
- setFocusable(true);
- setFocusableInTouchMode(true);
- this.setId(VIEWID);
+ setFocusable(true);
+ setFocusableInTouchMode(true);
+ this.setId(VIEWID);
- // add this to resolve Samsung's Galaxy opengl problem
- // here for reference.
- // http://www.anddev.org/samsung_galaxy_odd_ogl_es_hardware_acceleration_resolved-t8511.html
- /* need a real machine to test
- this.setEGLConfigChooser(
- new GLSurfaceView.EGLConfigChooser() {
- public EGLConfig chooseConfig(EGL10 egl,EGLDisplay display) {
- int[] attributes=new int[]{
- //EGL10.EGL_RED_SIZE,
- //5,
- //EGL10.EGL_BLUE_SIZE,
- //5,
- //EGL10.EGL_GREEN_SIZE,
- //6,
- EGL10.EGL_DEPTH_SIZE,
- 16,
- EGL10.EGL_NONE
- };
- EGLConfig[] configs=new EGLConfig[1];
- int[] result=new int[1];
- egl.eglChooseConfig(display,attributes,configs,1,result);
- return configs[0];
- }
- }
- );*/
+ // add this to resolve Samsung's Galaxy opengl problem
+ // here for reference.
+ // http://www.anddev.org/samsung_galaxy_odd_ogl_es_hardware_acceleration_resolved-t8511.html
+ /* need a real machine to test
+ this.setEGLConfigChooser(
+ new GLSurfaceView.EGLConfigChooser() {
+ public EGLConfig chooseConfig(EGL10 egl,EGLDisplay display) {
+ int[] attributes=new int[]{
+ //EGL10.EGL_RED_SIZE,
+ //5,
+ //EGL10.EGL_BLUE_SIZE,
+ //5,
+ //EGL10.EGL_GREEN_SIZE,
+ //6,
+ EGL10.EGL_DEPTH_SIZE,
+ 16,
+ EGL10.EGL_NONE
+ };
+ EGLConfig[] configs=new EGLConfig[1];
+ int[] result=new int[1];
+ egl.eglChooseConfig(display,attributes,configs,1,result);
+ return configs[0];
+ }
+ }
+ );*/
}
@Override