0

I'm new in game development. I'm working on an android game app for which i have used cocos2d-android.jar file to achieve cocos2d functionality. My app is running perfectly fine on all the screen resolutions except the xxhdpi screen size. When i run app on xxdpi screen sized devices it only shows the black screen. Please help me to find out the correct cocos2d jar file version which could run on the same code i have implemented and provide support for all resolution. Any help would be highly appreciated.

Niks
  • 11
  • 3

1 Answers1

0

up code:

    view = new CCGLSurfaceView(this);
    setContentView(view);

    CCDirector director = CCDirector.sharedDirector();
    director.attachInView(view);
    if(director.winSize().height > 1735){
        director.setScreenSize(director.winSize().width, 1735);
        FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) view.getLayoutParams();
        params.height = 1735;
        params.gravity = Gravity.CENTER;
        view.setLayoutParams(params);
    }

1735px is cocos2d-android1 can display max height.~~

see this:Has anyone run their game on Higher Resolution in Cocos2d-android?

Community
  • 1
  • 1
ipcjs
  • 2,082
  • 2
  • 17
  • 20