Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6761] Android: ICS: anyDensity=false in manifest ruins layout & scaling

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Do
Resolution Date2019-11-20T23:20:19.000+0000
Affected Version/sRelease 1.8.0, Release 1.8.0.1, Release 2.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsqe-ICS, tbs-1.8.2
ReporterTony Lukasavage
AssigneeUnknown
Created2011-12-19T13:47:11.000+0000
Updated2019-11-20T23:20:19.000+0000

Description

Summary

Whenever you build any app in Titanium Mobile for Android for the Galaxy Nexus (Android 4.0) while *Force GPU rendering* is enabled in the developer options, using
<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest>
        <supports-screens android:anyDensity="false"/>
    </manifest>
</android>
The formatting and scaling are thrown off entirely, as shown in the attached image file. Removing *anyDensity=false* or disabling gpu rendering resolves the issue, but requires the developer to use 'dp' notation everywhere even if they don't plan to support multiple densities.

basic code to reproduce

var win = Ti.UI.createWindow({
	backgroundColor: '#fff'
});
win.open();
With *anyDensity=false* in the tiapp.xml android manifest, this will generate the attached screenshot on a Galaxy nexus running 4.0. If *anyDensity=false* is removed from the manifest, you will get the expected white background covering the whole screen for the window.

Attachments

FileDateSize
fup.png2011-12-19T13:47:11.000+000090887

Comments

  1. Ping Wang 2011-12-21

    Can not reproduce with the latest master and 1_8_X.
  2. Tony Lukasavage 2011-12-21

    Updated ticket description to include the fact that this only occurs when
       settings -> developer options -> force gpu rendering
       
    has been enabled
  3. Tony Lukasavage 2012-01-13

    Also to note, this is not specific to Titanium. Native built Android apps are also subject to this issue.
  4. Alan Hutton 2019-11-20

    Should have been closed. Closing per dev comments.

JSON Source