{ "id": "92384", "key": "TIMOB-9277", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2020-01-09T22:09:00.000+0000", "created": "2012-05-25T08:05:03.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "SupportTeam", "api", "parity" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2020-01-09T22:09:00.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": "h3. Problem\r\n\r\nPlease run the sample code below:\r\n\r\n{noformat}\r\n\r\n\r\n//create component instance\r\nvar self = Ti.UI.createWindow({\r\n backgroundColor : '#ffffff',\r\n navBarHidden : true,\r\n exitOnClose : true\r\n});\r\n\r\nself.open();\r\n\r\nvar button = Ti.UI.createButton({\r\n top: 10,\r\n left: 50,\r\n width: 200,\r\n height: 100,\r\n image: 'KS_nav_ui.png' \r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\n text: 'Hello World' \r\n});\r\n\r\nbutton.add(label);\r\n\r\nself.add(button);\r\n\r\n{noformat}\r\n\r\nOn Android, the above code does not display the label on the button. It works fine on iOS. \r\n\r\nThe desired effect should be the same as iOS where the button image is shown on the left (as shown in the screenshot) and label on the right.\r\n", "attachment": [ { "id": "27944", "filename": "Screen Shot 2012-05-25 at 8.26.15 AM.png", "author": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "created": "2012-05-25T08:26:50.000+0000", "size": 502900, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Cannot add label to a button. Works on iOS", "creator": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "environment": "Platform OS: Android\r\n", "comment": { "comments": [ { "id": "196438", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-05-29T23:47:46.000+0000", "updated": "2012-05-29T23:47:46.000+0000" }, { "id": "200795", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes on Android the Button widget is NOT a ViewGroup. What is the use case here of using a Label\r\nrather then just setting the \"title\" of the button? I don't think supporting child views in Buttons will\r\nbe something we support on Android. Like Blain says there might be a better way to accomplish what you are trying to do.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-28T14:13:22.000+0000", "updated": "2012-06-28T14:13:22.000+0000" }, { "id": "202127", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We can use \"\\n\" to break the line for the \"title\" of the button on Android and Mobile Web. ", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-09T11:57:38.000+0000", "updated": "2012-07-09T11:57:38.000+0000" }, { "id": "239623", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue still present in the following sdk versions - version 3.0.2, version 3.1.0. So the bug can be reproduced in the latest build.", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-25T09:29:39.000+0000", "updated": "2013-02-25T09:29:39.000+0000" }, { "id": "248660", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "This feature is necessary in cases where you want to position text or counters inside a button view. By having this you can make custom buttons. The title parameter on the button view doesn't allow much customization, specially regarding the positioning of the text.", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2013-04-22T19:15:45.000+0000", "updated": "2013-04-22T19:15:45.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }