Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
NathanaelA opened this issue Nov 24, 2016 · 10 comments
Closed

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

NathanaelA opened this issue Nov 24, 2016 · 10 comments

Comments

@NathanaelA
Copy link
Contributor

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.

@NathanaelA

This comment was marked as abuse.

@NickIliev
Copy link
Contributor

Hey @NathanaelA

I have tested your issue (here is the sample app and I've used Android 4.4.4 Samsung GalaxyS4 emulator with a predefined screen size of 1024 x 768 (had to use Geny to create this specific emulator as I have not found a similar image for the 'state' AVD). However, I was not able to reproduce your results (with or without the modifications in platform.android.js the final results were the same in both cases).

Can you please share with us what system image you have used for the testing!?

@NathanaelA

This comment was marked as abuse.

@NathanaelA

This comment was marked as abuse.

@NickIliev
Copy link
Contributor

@NathanaelA I can confirm that mine emulator was created without the check for "Show Android Navigation Bar" and after I turned that option on I have reproduced your case, so I also think it is more likely a Genymotion related problem than a real issue. I personally prefer testing on AVDs with HAXM, as they are much more reliable, although lacking some of the option available in Genymotion.

@NathanaelA

This comment was marked as abuse.

@NathanaelA

This comment was marked as abuse.

@vakrilov
Copy link
Contributor

Hey @NathanaelA - good catch.
Indeed using the WINDOW_SERVICE method seems to return more consistent results and I believe this is the metrics we should use in the platforms module.

Can you do a PR with the fix?

@NickIliev NickIliev added the bug label Nov 28, 2016
@NathanaelA

This comment was marked as abuse.

@tsonevn tsonevn modified the milestones: 2.6.0 (TBD), 2.5.0 Dec 5, 2016
@tsonevn tsonevn added the ready for test TSC needs to test this and confirm against live production apps and automated test suites label Dec 5, 2016
@SvetoslavTsenov SvetoslavTsenov self-assigned this Jan 10, 2017
@SvetoslavTsenov SvetoslavTsenov added done and removed ready for test TSC needs to test this and confirm against live production apps and automated test suites labels Jan 10, 2017
@SvetoslavTsenov SvetoslavTsenov removed their assignment Jan 10, 2017
@lock
Copy link

lock bot commented Aug 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants