{ "id": "94790", "key": "TIMOB-9924", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "13573", "description": "Sprint 2012-15 API", "name": "Sprint 2012-15 API", "archived": true, "released": true, "releaseDate": "2012-07-30" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-13T15:49:12.000+0000", "created": "2012-07-10T15:16:11.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "module_label", "parity", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "23860", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94789", "key": "TIMOB-9923", "fields": { "summary": "Android: Labels disappear if width or height is set to SIZE", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-12-21T18:31:35.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": "Parity ticket for android. MW supports this feature and IOS has implemented it as part of TIMOB-2574.\r\nAndroid needs to achieve parity\r\nTest Code\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white',\r\n});\r\n\r\nvar theFont = {fontSize: 11, font: 'Helevetica' };\r\nvar container = Ti.UI.createView({\r\n\tlayout:'vertical'\r\n}) \r\nvar controls1 = Ti.UI.createView({\r\n\tlayout:'horizontal',\r\n\theight:Ti.UI.SIZE,\r\n\ttop:10,\r\n\tborderColor:'#ccc',\r\n\tborderWidth:1\r\n}) \r\n\r\nvar title1 = Ti.UI.createLabel({\r\n\tfont :theFont,\r\n\ttext:'V-ALIGN'\r\n})\r\nvar c1b1 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'TOP'\r\n})\r\nvar c1b2 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'BOTTOM'\r\n})\r\nvar c1b3 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'CENTER'\r\n})\r\ncontrols1.add(title1);\r\ncontrols1.add(c1b1);\r\ncontrols1.add(c1b2);\r\ncontrols1.add(c1b3);\r\ncontainer.add(controls1)\r\n\r\nvar controls2 = Ti.UI.createView({\r\n\tlayout:'horizontal',\r\n\theight:Ti.UI.SIZE,\r\n\ttop:10,\r\n\tborderColor:'#ccc',\r\n\tborderWidth:1\r\n}) \r\n\r\nvar title2 = Ti.UI.createLabel({\r\n\tfont :theFont,\r\n\ttext:'T-ALIGN'\r\n})\r\nvar c2b1 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'LEFT'\r\n})\r\nvar c2b2 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'RIGHT'\r\n})\r\nvar c2b3 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'CENTER'\r\n})\r\ncontrols2.add(title2);\r\ncontrols2.add(c2b1);\r\ncontrols2.add(c2b2);\r\ncontrols2.add(c2b3);\r\ncontainer.add(controls2)\r\n\r\nvar controls3 = Ti.UI.createView({\r\n\tlayout:'horizontal',\r\n\theight:Ti.UI.SIZE,\r\n\ttop:10,\r\n\tborderColor:'#ccc',\r\n\tborderWidth:1\r\n}) \r\n\r\nvar title3 = Ti.UI.createLabel({\r\n\tfont :theFont,\r\n\ttext:'WIDTH'\r\n})\r\nvar c3b1 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'SIZE'\r\n})\r\nvar c3b2 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'200'\r\n})\r\nvar c3b3 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'150'\r\n})\r\nvar c3b4 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'100'\r\n})\r\ncontrols3.add(title3);\r\ncontrols3.add(c3b1);\r\ncontrols3.add(c3b2);\r\ncontrols3.add(c3b3);\r\ncontrols3.add(c3b4);\r\ncontainer.add(controls3);\r\n\r\nvar controls4 = Ti.UI.createView({\r\n\tlayout:'horizontal',\r\n\theight:Ti.UI.SIZE,\r\n\ttop:10,\r\n\tborderColor:'#ccc',\r\n\tborderWidth:1\r\n}) \r\n\r\nvar title4 = Ti.UI.createLabel({\r\n\tfont :theFont,\r\n\ttext:'HEIGHT'\r\n})\r\nvar c4b1 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'SIZE'\r\n})\r\nvar c4b2 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'200'\r\n})\r\nvar c4b3 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'150'\r\n})\r\nvar c4b4 = Ti.UI.createButton({\r\n\tleft:10,\r\n\tfont :theFont,\r\n\ttitle:'100'\r\n})\r\ncontrols4.add(title4);\r\ncontrols4.add(c4b1);\r\ncontrols4.add(c4b2);\r\ncontrols4.add(c4b3);\r\ncontrols4.add(c4b4);\r\ncontainer.add(controls4);\r\n\r\nvar testLabel = Ti.UI.createLabel({\r\n\tbackgroundColor: 'white',\r\n color: 'black',\r\n //text:'I am the test label. Switch my properties around and see me change. Vertical Alignment should work well with change in size and text alignment.',\r\n text:'A long label with\\na few line breaks\\nand unicode (UTF8)\\nsymbols such as\\na white chess piece \\u2655\\nand the euro symbol \\u20ac\\nlooks like this!\\n',\r\n borderColor:'red',\r\n borderWidth:1,\r\n top:10\r\n})\r\ncontainer.add(testLabel);\r\n\r\nwin.add(container);\r\nwin.open();\r\n\r\n\r\nc1b1.addEventListener('click',function(e){testLabel.verticalAlign = Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP});\r\nc1b2.addEventListener('click',function(e){testLabel.verticalAlign = Ti.UI.TEXT_VERTICAL_ALIGNMENT_BOTTOM});\r\nc1b3.addEventListener('click',function(e){testLabel.verticalAlign = Ti.UI.TEXT_VERTICAL_ALIGNMENT_CENTER});\r\nc2b1.addEventListener('click',function(e){testLabel.textAlign = Ti.UI.TEXT_ALIGNMENT_LEFT});\r\nc2b2.addEventListener('click',function(e){testLabel.textAlign = Ti.UI.TEXT_ALIGNMENT_RIGHT});\r\nc2b3.addEventListener('click',function(e){testLabel.textAlign = Ti.UI.TEXT_ALIGNMENT_CENTER});\r\nc3b1.addEventListener('click',function(e){testLabel.width = Ti.UI.SIZE})\r\nc3b2.addEventListener('click',function(e){testLabel.width = 200})\r\nc3b3.addEventListener('click',function(e){testLabel.width = 150})\r\nc3b4.addEventListener('click',function(e){testLabel.width = 100})\r\nc4b1.addEventListener('click',function(e){testLabel.height = Ti.UI.SIZE})\r\nc4b2.addEventListener('click',function(e){testLabel.height = 200})\r\nc4b3.addEventListener('click',function(e){testLabel.height = 150})\r\nc4b4.addEventListener('click',function(e){testLabel.height = 100})\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Support vertical align on Labels", "creator": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "203065", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created [PR #2554|https://github.com/appcelerator/titanium_mobile/pull/2554] to resolve issue.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-12T17:06:21.000+0000", "updated": "2012-07-12T17:06:21.000+0000" }, { "id": "214501", "author": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with:\r\nTitanium Studio, build: 2.1.1.201207271312\r\nSDK version: 2.2.0.v20120813184911\r\n\r\nDevices:\r\nLG VS910 4G (2.3.6)\r\nSamsung Galaxy Nexus (4.0.4)\r\n", "updateAuthor": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T17:11:41.000+0000", "updated": "2012-08-14T17:11:41.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }