{ "id": "91929", "key": "TIMOB-9160", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14158", "description": "Sprint 2012-20 Core", "name": "Sprint 2012-20 Core", "archived": true, "released": true, "releaseDate": "2012-10-08" }, { "id": "14272", "description": "2012 Sprint 20", "name": "2012 Sprint 20", "archived": true, "released": true, "releaseDate": "2012-10-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-10-08T20:58:14.000+0000", "created": "2012-05-16T17:36:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_android", "parity", "qe-manualtest" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2014-08-08T22:01:47.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h1. Expected results:\r\n\r\nI can set the ti.ui.defaultunit property in tiapp.xml to 'dip' and have font sizes respect that setting.\r\n\r\nh2. Actual results:\r\n\r\nI can explicitly set fontSize='14dip' and text will be sized appropriately. But setting the default unit in tiapp.xml and setting fontSize=14 gives px based font sizing.\r\n\r\nSee the attached screen: dip is included in the tiapp.xml file, the field labels (URL, Username, etc.) are set with fontSize=## whereas the contents of the first text field is set with fontSize='14dip'\r\n\r\nTested on my Galaxy Nexus running ICS/4.0.2. I'm using the https://github.com/gshipley/BeerShift application featured in the developer blog.", "attachment": [ { "id": "32284", "filename": "app.js", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-10-04T12:16:33.000+0000", "size": 1845, "mimeType": "text/javascript" }, { "id": "27727", "filename": "device-2012-05-16-173228.png", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2012-05-16T17:37:32.000+0000", "size": 52576, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Font sizing should obey the ti.ui.defaultunit setting in tiapp.xml", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 3, "state": "closed", "name": "Release 3.0.0", "startDate": "2012-09-27T05:26:46.636Z", "endDate": "2012-10-08T20:05:00.000Z", "completeDate": "2012-12-20T17:03:19.403Z" } ], "comment": { "comments": [ { "id": "217862", "author": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "body": "+1", "updateAuthor": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "created": "2012-09-06T13:37:28.000+0000", "updated": "2012-09-06T13:37:28.000+0000" }, { "id": "222048", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "h3. Fail case / Test case\n\n**Note**: Need a high density device to test with (that's basically any device these days) or an emulator such as WVGA854.\n\n# Create a new mobile project, leave the ti.ui.defaultunit setting in tiapp.xml at \"system\".\n# Replace the app.js with the code from below.\n# Run the app. The text is crazy small.\n# Change the ti.ui.defaultunit setting in tiapp.xml to \"dip\".\n# Run the app again. In the fail case, the text is still crazy small. When testing the fix, the text should have grown up.\n\nNotes: TextArea (another control that supports \"font\") uses the same view as TextField, so I haven't bothered to add it here. Anyways, all of our controls that support \"font\" use the exact same method in Java to style the text: TiUIHelper.styleText.\n\nHere's that app.js (I've also attached it since it's kinda long):\n\n{code:title=app.js}\nTi.UI.backgroundColor = \"#fff\";\nvar win = Titanium.UI.createWindow({ \n title:'Test',\n backgroundColor:'#fff',\n\texitOnClose: true,\n\torientationModes: [Ti.UI.PORTRAIT]\n}),\nlogLabel = Ti.UI.createLabel({\n\tbottom: \"8dp\", left: \"8dp\", right: \"8dp\", height: \"192dp\",\n\tbackgroundColor: \"black\", color: \"white\",\n\tfont: {fontSize: 12},\n\tverticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP\n}),\nlog = function(s, clearFirst) {\n\tvar current = logLabel.text;\n\tif (current && !clearFirst) {\n\t\tcurrent += \"\\n\";\n\t} else {\n\t\tcurrent = \"\";\n\t}\n\tcurrent += s;\n\tlogLabel.text = current;\n},\nbutton = Ti.UI.createButton({\n\tleft: \"8dp\", right: \"8dp\", top: \"8dp\", height: \"48dp\",\n\ttitle: \"A long-titled button\",\n\tfont: {fontSize: 12}\n}),\ntextField = Ti.UI.createTextField({\n\thintText: \"A long-hinted text field\",\n\tleft: \"8dp\", right: \"8dp\", top: \"64dp\", height: \"48dp\",\n\tfont: {fontSize: 12}\n}),\nactivityIndicator = Ti.UI.createActivityIndicator({\n\tstyle: Titanium.UI.ActivityIndicatorStyle.BIG_DARK,\n\tmessage: \"An activity indicator, dear friends.\",\n\tfont: {fontSize: 12}, top: \"120dp\", left: \"8dp\",\n\tright: \"8dp\", height: \"96dp\"\n});\n\nwin.add(logLabel);\nwin.add(textField);\nwin.add(button);\nwin.add(activityIndicator);\n\nlog(\"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sem mauris, fringilla sed condimentum ac, tempor quis justo. Praesent vel volutpat arcu. Fusce porttitor condimentum consectetur. Suspendisse potenti. Integer pellentesque blandit ullamcorper. Ut tincidunt ante sit amet lorem scelerisque vitae rutrum turpis placerat. Integer massa odio, bibendum eu molestie et, ornare non purus. Nullam accumsan neque id sapien ornare hendrerit. Etiam lacinia diam eget ligula dictum feugiat. Sed malesuada justo vel mi luctus tempor. Proin eu porta arcu.\");\n\nwin.addEventListener(\"open\", function() {activityIndicator.show();});\nwin.open();\n{code}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-10-04T12:15:51.000+0000", "updated": "2012-10-04T12:15:51.000+0000" }, { "id": "222049", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR ready:\n\nhttps://github.com/appcelerator/titanium_mobile/pull/3108", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-10-04T12:18:09.000+0000", "updated": "2012-10-04T12:18:09.000+0000" }, { "id": "230268", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the issue is no more occurring.\r\nChanging to 'dip' increased int font size.\r\nTitanium studio : 3.0.0.201211301903\r\nSDK Version : 3.0.0.v20121204154658\r\nCLI version : 3.0.19\r\nOS : OSX 10.8.2\r\nAndroid : 4.0.4\r\nSamsung S3\r\n", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-06T19:53:51.000+0000", "updated": "2012-12-06T19:53:51.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }