0

我已经开发了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);
        }
    }
4

1 回答 1

0

我认为您需要在活动的 onstart 方法中而不是在 oncreate 中添加 displayRevMob() 方法。

于 2013-08-23T11:51:24.783 回答