0

I've spent many hours trying to solve this problem, but I still can't understand why does this happen. I've seen a lot of examples of using RatioResolutionPolicy and found no mistakes in my code, difference is just that all examples are run in landscape orientation, not portrait. Here's my code:

    this.mCamera = new Camera(0, 0, 320, 480);
final EngineOptions engineOptions = new EngineOptions(true,
                                ScreenOrientation.PORTRAIT, new RatioResolutionPolicy(320, 480), mCamera);
                return new Engine(engineOptions);

And here's the result on a 854x480 screen:enter image description here

Does anyone have any ideas? Thanks.

Egor
  • 39,695
  • 10
  • 113
  • 130

1 Answers1

1

You didn't post what your actual problem is, but I assume you are talking about the black 'bars' at the top/bottom? The reason is:

320 / 480 = 0.6666

480 / 854 = 0.5621

--> You get 134 black pixels, 67 at the top and 67 at the bottom.

Nicolas Gramlich
  • 2,790
  • 19
  • 19
  • Please, follow my question at http://www.andengine.org/forums/development/ratioresolutionpolicy-portrait-orientation-issue-t3375.html, thanks for you answer. – Egor May 24 '11 at 13:32