Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4465] Sony X10: Ti.Platform.displayCaps does not return correct values, causing UI objects to be shrunk in size

GitHub Issuen/a
TypeBug
PriorityLow
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 1.7.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterChris Whittle
AssigneeIngo Muschenetz
Created2011-05-26T05:44:33.000+0000
Updated2015-04-13T20:12:30.000+0000

Description

When the following code is run on a Sony X10 (Android device), the Ti.Platform.displayCaps are not correct, causing UI objects to be shrunk to an extent where they are unreadable. The following code demonstrates the issue:
Ti.API.info("Display dimensions: " + Ti.Platform.displayCaps.platformWidth + " x " + Ti.Platform.displayCaps.platformHeight);
When running 1.6.2 it returns "Display dimensions: 320 x 569" (correct) When running 1.7.0 it returns "Display dimensions: 480 X 854" (too large) See original QA [http://developer.appcelerator.com/question/120119/weird-ui-issues]

Comments

  1. Paul Dowsett 2011-05-28

    In order for us to progress this issue, edit your ticket to include a proper [Use-case](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-CreatingGoodUsecases). Also include the Titanium SDK version (including date + commit hash) that this has been tested on. Please read the [Submitting Bug Reports](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-SubmittingBugReports) guide before raising tickets. Thank you
  2. Paul Dowsett 2011-06-10

    No response from user after request for information. Marking resolved / incomplete.
  3. Chris Whittle 2011-06-12

    Sorry.... I haven't had time ( I had just went back to 1.6 to take care of it for the time...) In the app.js just put an alert of Titanium.Platform.displayCaps.platformWidth + " X " + Titanium.Platform.displayCaps.platformHeight on a Sony Xperia X10 i get 1.6 (latest) it's 569 X 320 1.7 (latest not RC) it's 854 X 480
  4. Paul Dowsett 2011-06-13

    Chris This is not an adequate usecase - it needs to be a script that runs without modification when pasted into a blank app.js file. Then it needs to be tested in your environment to confirm it demonstrates the issue. Please read the links I provided for more information. Thank you
  5. Chris Whittle 2011-06-13

    Here you go... put this in your app.js alert(Titanium.Platform.displayCaps.platformWidth + " X " + Titanium.Platform.displayCaps.platformHeight); When running 1.6.2 (latest) it returns "320 x 569" When running 1.7.0 (latest not RC) it returns "480 X 854" This is on a Sony X10 Running Android 2.2.1
  6. Chris Whittle 2011-06-13

    Why is this closed? I gave you what you asked for... It's a real issue causing problems...
  7. Paul Dowsett 2011-06-13

    Chris Please note what I said before, "In order for us to progress this issue, *edit your ticket* to include...". Please provide the *build date and hash* of the Titanium SDKs you've tested.
  8. Paul Dowsett 2011-06-13

    Also, as you have specifically mentioned UI objects in the summary and description, demonstrate the issue with at least one UI element included in your code. Ensure that you use the wiki markup provided.
  9. Chris Whittle 2011-06-15

    How do I get the hash and build date?
  10. Paul Dowsett 2011-06-18

    When the app is started, the build date and hash are output to the TiStudio console. Alternatively, use adb -e logcat from the shell.
  11. Chris Whittle 2011-06-19

    [INFO] Titanium SDK version: 1.7.0 (06/06/11 18:05 64155ee) and [INFO] Titanium SDK version: 1.6.2 (04/18/11 17:16 878906d)
  12. Paul Dowsett 2011-06-20

    Chris, I really can't afford to spend any further time on this single ticket. I will correct it for you this time, but please ensure that any future tickets you raise are in accordance with the [Submitting Bug Reports](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-SubmittingBugReports) guide. Please see the amended ticket to see what is required. Thank you

JSON Source