{ "id": "84202", "key": "TIMOB-6992", "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": "12097", "description": "", "name": "Sprint 2012-05", "archived": true, "released": true, "releaseDate": "2012-03-11" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-04-02T13:40:12.000+0000", "created": "2011-12-22T10:03:40.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_activityindicator", "parity", "qe-testadded" ], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" } ], "issuelinks": [ { "id": "15538", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "86454", "key": "TIMOB-7643", "fields": { "summary": "Android: Implement the UI Composite Layout Behavior Spec", "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": "Critical", "id": "1" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-04-02T13:40:12.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Actual Result\r\n\r\nSetting the \"left\" or \"right\" property of a Ti.UI.ActivityIndicator yields incorrect positioning. The ActivityIndicator seems to be centering on a horizontal coordinate that is relative to the center of the view that the ActivityIndicator is added to.\r\n\r\nExamples:\r\n* ActivityIndicator with left=0 or right=0 will be centered within its view.\r\n* ActivityIndicator with left=50 will have its center positioned 50px to the right of the center of its view. \r\n* ActivityIndicator with right=-50 will have its center positioned 50px to the right of the center of its view. \r\n* ActivityIndicator with right=50 will have its center positioned 50px to the left of the center of its view. \r\n\r\nh2. Expected result\r\n\r\nWhen the \"left\" or \"right\" property is supplied, the Ti.UI.ActivityIndicator should be positioned within the view it is added to accordingly, just like any other component would be (button, image, label, etc).\r\n\r\nh2. Test case\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar win1 = Ti.UI.createWindow({\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar label1 = Ti.UI.createLabel({\r\n backgroundColor:'green',\r\n color:'white',\r\n text:'Spinner should be on top of the X',\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n textAlign:'center',\r\n top:40,\r\n height:40,\r\n width:'auto'\r\n});\r\nwin1.add(label1);\r\n\r\nvar view1 = Ti.UI.createView({\r\n backgroundColor:'yellow',\r\n height:30,\r\n top:100,\r\n width:100\r\n});\r\nwin1.add(view1);\r\n\r\nvar spin1=Ti.UI.createActivityIndicator({\r\n //right:25,\r\n left:25,\r\n style:Ti.UI.iPhone.ActivityIndicatorStyle.DARK\r\n});\r\nview1.add(spin1);\r\n\r\nvar marker1=Ti.UI.createLabel({\r\n //right:25,\r\n left:25,\r\n height:'auto',\r\n width:'auto',\r\n text:'X'\r\n});\r\nview1.add(marker1);\r\n\r\nwin1.open();\r\nspin1.show();\r\n{code}\r\n\r\nThe code above should place the spinner right on top of the X.\r\n\r\n\r\nh2. Workaround\r\n\r\nExplicitly set the activityIndicator width and height properties to {{'auto'}}", "attachment": [], "flagged": false, "summary": "iOS: UI - ActivityIndicator incorrect positioning with left and right properties", "creator": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "environment": "* Titanium Mobile 1.7.5, 1.8.1, 1.8.0.1-20111215092838 (12/15/2011)\r\n* iOS 5.0\r\n* iPhone simulator\r\n* Titanium Studio, build: 1.0.6.201110251616\r\n* OSX 10.7.2", "comment": { "comments": [ { "id": "177033", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Thanks for this ticket, Shawn. Would you mind completing the environment field, so that I may move it to the main project?\r\n\r\nCheers", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-22T10:48:14.000+0000", "updated": "2011-12-22T10:48:14.000+0000" }, { "id": "177034", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "I will close this for now. Please reopen the ticket once it is complete, and I will move it to the main project.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-22T10:48:33.000+0000", "updated": "2011-12-22T10:48:33.000+0000" }, { "id": "177046", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Paul, I added \"iOS 5.0, OSX 10.7.2\" and my Ti Studio version to the environment section. Is that what you needed?\r\n\r\nI cannot reopen the ticket myself (or I don't know how to). Please reopen and move to main project. Thanks.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2011-12-22T12:00:12.000+0000", "updated": "2011-12-22T12:00:12.000+0000" }, { "id": "177852", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Thanks for the email, Shawn. I will look at this in detail tomorrow.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-03T09:43:25.000+0000", "updated": "2012-01-03T09:43:25.000+0000" }, { "id": "178120", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Just to note, I've accepted this ticket.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-05T08:43:33.000+0000", "updated": "2012-01-05T08:43:33.000+0000" }, { "id": "185116", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tentatively linking to TIMOB-7643. The behavior on activity indicator was because it was doing fill, not size, sizing by default. The new composite layout behavior may fix this.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-05T19:00:28.000+0000", "updated": "2012-03-05T19:00:28.000+0000" }, { "id": "185163", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Vishal verified that TIMOB-7643 will fix this.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-06T10:05:12.000+0000", "updated": "2012-03-06T10:05:12.000+0000" }, { "id": "185252", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mega-pull #1523 fixes this.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-06T15:24:44.000+0000", "updated": "2012-03-06T15:24:44.000+0000" }, { "id": "186633", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nSDK build: 2.0.0.v20120315091738\r\nTitanium Studio, build: 2.0.0.201203142055\r\nxcode: 4.2\r\nDevice: iphone 4s (5.0.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-15T10:38:23.000+0000", "updated": "2012-03-15T10:38:23.000+0000" }, { "id": "189534", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening/closing to add/remove labels", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-02T13:36:37.000+0000", "updated": "2012-04-02T13:36:37.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }