{ "id": "88628", "key": "TIMOB-8245", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-03-26T13:05:16.000+0000", "created": "2012-03-23T13:02:52.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity", "qe-and031912", "qe-nfc" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T23:23:50.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": "Steps to reproduce:\r\n1. Run the following code:\r\n{code}\r\n// Create 3 button on a parent that is width and height constrained with the following text:\r\n// A\r\n// Test\r\n// VeryLongButtonText1234567890 \r\n// See that the button sizes itself accordingly\r\n\r\nvar win = Ti.UI.createWindow();\r\nwin.backgroundColor = 'white';\r\n\r\nvar label = Ti.UI.createLabel({\r\n\ttext: 'Buttons should auto size to text, but stay within red',\r\n\ttop: 20,\r\n\tleft: 10,\r\n\theight: Ti.UI.SIZE,\r\n\twidth: Ti.UI.SIZE,\r\n\tcolor: 'black'\r\n});\r\n// Short Test\r\nvar outlineView1 = Ti.UI.createView({\r\n\theight: 62,\r\n\twidth: 152,\r\n\ttop: 80,\r\n\tbackgroundColor: 'red'\r\n});\r\nvar view1 = Ti.UI.createView({\r\n\theight: 60,\r\n\twidth: 150\r\n});\r\nvar button1 = Ti.UI.createButton({\r\n\ttitle: 'A'\r\n});\r\nview1.add(button1);\r\noutlineView1.add(view1);\r\n\r\n// Medium Test\r\nvar outlineView2 = Ti.UI.createView({\r\n\theight: 62,\r\n\twidth: 152,\r\n\ttop: 180,\r\n\tbackgroundColor: 'red'\r\n});\r\nvar view2 = Ti.UI.createView({\r\n\theight: 60,\r\n\twidth: 150\r\n});\r\nvar button2 = Ti.UI.createButton({\r\n\ttitle: 'Test'\r\n});\r\nview2.add(button2);\r\noutlineView2.add(view2);\r\n\r\n// Long Test\r\nvar outlineView3 = Ti.UI.createView({\r\n\theight: 62,\r\n\twidth: 152,\r\n\ttop: 280,\r\n\tbackgroundColor: 'red'\r\n});\r\nvar view3 = Ti.UI.createView({\r\n\theight: 60,\r\n\twidth: 150\r\n});\r\nvar button3 = Ti.UI.createButton({\r\n\ttitle: 'VeryLongButtonText1234567890 '\r\n});\r\nview3.add(button3);\r\noutlineView3.add(view3);\r\n\r\n\r\nwin.add(label);\r\nwin.add(outlineView1);\r\nwin.add(outlineView2);\r\nwin.add(outlineView3);\r\n\r\nwin.open();\r\n{code}\r\n\r\nActual: The last button does not auto fit the long text. See attachment.\r\nExpected: The last button should auto fit the long text\r\n\r\nNote:\r\n* Above code works as expected on iOS.", "attachment": [ { "id": "26528", "filename": "device-2012-03-23-140417.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-23T13:04:46.000+0000", "size": 43556, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Button - Button will not auto resize to fit long text", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "SDK build: 2.0.0.v20120322190311\r\nRuntime: v8, rhino\r\nTitanium Studio, build: 2.0.0.201203221554\r\nDevice: Galaxy Nexus (4.0.2), Nexus 1 (2.2.2)", "comment": { "comments": [ { "id": "188606", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also occurs on:\r\nTitanium Studio, build: 2.0.0.201203262445\r\nSDK: 2.0.0.v20120325213306\r\nDevice: Android Nexus S (2.3.6)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-26T10:52:08.000+0000", "updated": "2012-03-26T10:52:08.000+0000" }, { "id": "188608", "author": { "name": "sshylaja", "key": "sshylaja", "displayName": "Sitara Shylaja", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This also occurs on Android(2.2.2) Nexus one when tested on\r\n\r\nTitanium mobilesdk-2.0.0.v20120325213306\r\nTitanium Studio build: 2.0.0.201203262445", "updateAuthor": { "name": "sshylaja", "key": "sshylaja", "displayName": "Sitara Shylaja", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-26T10:52:33.000+0000", "updated": "2012-03-26T10:52:33.000+0000" }, { "id": "188656", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "Android behavior is correct in this use case", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2012-03-26T13:05:16.000+0000", "updated": "2012-03-26T13:05:16.000+0000" }, { "id": "410998", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T23:23:50.000+0000", "updated": "2017-03-09T23:23:50.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }