0
\$\begingroup\$

I want my game to run on all Android devices in LANDSCAPE_FIXED mode, but this mode works only for some screen resolutions. PORTRAIT_FIXED works well for all devices. I'm testing this on and emulator.

How can I achieve this? Here's my camera/engine initialization code:

public EngineOptions onCreateEngineOptions() {
    cw=480;
    ch=320;
    camera = new Camera(0, 0, cw, ch);
    EngineOptions engineOptions = new EngineOptions(
        true,
        ScreenOrientation.LANDSCAPE_FIXED,
        new RatioResolutionPolicy(cw, ch),
        this.camera
    );
    engineOptions.setWakeLockOptions(WakeLockOptions.SCREEN_ON);
    return engineOptions;
}
\$\endgroup\$
1
\$\begingroup\$

Try using the android:screenOrientation="landscape" option in the manifest file's activity tag.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.