Skip to content

Issue with WHxxx calculations on android / wrong files loaded. #3163

@NathanaelA

Description

@NathanaelA

Please, provide the details below:

Ok, here is the scenario;
Android 4.4.4, using a Device with the size 1024x600. So In portrait mode the app starts up fine as a "tablet" sized device. However if the app was switched to Landscape (still thinks it is a tablet) and will continue to use the MW600 files for the rest of the session. However, if you exit the app in Landscape and restart the application; the application is Width is calculated as 1024, but the Height is now calculated as 552. So this now causes the wrong files to be loaded. It no longer things it is a tablet device.

Maybe I am thinking wrong, but the calculations needs to be using the raw values of the device not the values minus action/tool bars.

Which platform(s) does your issue occur on?

Android ( iOS might have a similar issue, but 1024x768 - size is still above the 600 )

Please provide the following version numbers that your issue occurs with:

2.4.x

Please tell us how to recreate the issue in as much detail as possible.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

  • Create a demo app
  • Make sure Action bar is enabled.
  • Create a main-page.css, add Page { background-color: red; }
  • Create a main-page.minWH600.css add Page { background-color: green; }
  • Consider adding to the tap event out put of the current width/height.

Run the app on a emulator with the dimensions of 1024x600. (This is what a Amazon Fire is).
Start it up; you should get a green page. Change orientation. Quit the app. Start the app up again, you will get the red page.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions