之间采用Cocos2d-x(3.2)下UI框架组件pageview,scrollview,tableview等在android4.2.2机器上运行屏幕变色,滚动滑块不裁剪遮罩,需要手动修改工程目录下的AppActivity.java文件。proj.android\src\org\cocos2dx\AppActivity.java
在此java类中加入onCreateView函数,并引入相关包
如下:
package org.cocos2dx.cpp;
import org.cocos2dx.lib.Cocos2dxActivity;
import org.cocos2dx.lib.Cocos2dxGLSurfaceView;
public class AppActivity extends Cocos2dxActivity {
public Cocos2dxGLSurfaceView onCreateView() {
Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this);
glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8);
return glSurfaceView;
}
}