我开发了cocos2d游戏应用程序,这里游戏开始时目标从上到下开始下降,这里没有问题,在添加revmob(广告页面)代码后,目标没有落入屏幕,我有检查revmob代码一切都是正确的,但不知道我哪里出错了,请看看我的问题,提前谢谢:)
@Override
protected void onCreate( Bundle savedInstanceState )
{
super.onCreate( savedInstanceState );
// hide titlebar of application
// must be before setting the layout
this.requestWindowFeature( Window.FEATURE_NO_TITLE );
// hide statusbar of Android
// could also be done later
this.getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN );
this.getWindow().setFlags( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON );
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT );
mGLSurfaceView = new CCGLSurfaceView(this);
setContentView(mGLSurfaceView);
revmob = RevMob.start(this, APPLICATION_ID);
displayRevMob();
CCDirector.sharedDirector().attachInView(mGLSurfaceView);
}
public void displayRevMob(){
revmob.showFullscreen(this);
}
}
答案 0 :(得分:0)
我认为你需要在活动的onstart方法中添加displayRevMob()方法而不是oncreate。