{ "id": "91245", "key": "TIMOB-8968", "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": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" }, { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13406", "description": "Sprint 2012-10 API", "name": "Sprint 2012-10 API", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-07T11:20:01.000+0000", "created": "2012-05-02T18:21:34.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_window", "qe-testadded", "regression" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-09T10:43:06.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. Problem description\r\nUsing titleControl property to set the view to show in the navbar.\r\nView's backGroundImage is positioned on top/left corner of the windows navbar instead of in the center.\r\n\r\nAttaching screenshot\r\n\r\nh2. Code sample\r\n{code}\r\n\r\nAttached the background image used (ing_logo_header.png)\r\n\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor:'white',\r\n title:'window',\r\n barColor:'#ff7b01',\r\n top:0,\r\n navBarHidden:false\r\n });\r\n \r\n var tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win\r\n}); \r\n\r\n \r\nvar titleImage = Ti.UI.createView({\r\n\t\t\twidth:94,\r\n\t\t\theight:24,\r\n\t\t\t// center\r\n\tbackgroundImage:'/ing_logo_header.png',\r\n});\r\n\r\nwin.titleControl = titleImage;\r\n\t\t\t\t\t\t\r\n//win.open();\r\ntabGroup.addTab(tab1); \r\ntabGroup.open();\r\n{code}", "attachment": [ { "id": "27509", "filename": "ing_logo_header.png", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-02T18:21:34.000+0000", "size": 5812, "mimeType": "image/png" }, { "id": "27511", "filename": "Screen Shot 2012-05-02 at 4.27.33 PM.png", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-03T03:04:20.000+0000", "size": 96676, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: titleControl property is positioning the image on top/left corner", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 2.1.0.v20120501113332", "comment": { "comments": [ { "id": "193848", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Broken due to the fix in TIMOB-8613.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-04T15:57:41.000+0000", "updated": "2012-05-04T15:57:41.000+0000" }, { "id": "193856", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test Code. This includes the test case from TIMOB-8613\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\nvar titleImage = Ti.UI.createView({\r\n width:94,\r\n height:24,\r\n \t\tbackgroundImage:'/ing_logo_header.png',\r\n});\r\n\r\nvar titleView = Ti.UI.createView({})\r\nvar label = Ti.UI.createLabel({ text:'LONG TEXT WILL NOT FIT IN PORTRAIT', top:10 })\r\ntitleView.add(label);\r\nvar label2 = Ti.UI.createLabel({ text:'LONG2 TEXT WILL NOT FIT IN PORTRAIT', top:10 })\r\n\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor:'white',\r\n title:'window',\r\n barColor:'#ff7b01',\r\n top:0,\r\n navBarHidden:false\r\n });\r\nwin.orientationModes = [Ti.UI.PORTRAIT,Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT]; \r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win\r\n});\r\n\r\nvar btn1 = Ti.UI.createButton({\r\n\ttop:10,\r\n\theight:30,\r\n\ttitle:'Test Label'\r\n})\r\n\r\nbtn1.addEventListener('click',function(){\r\n\twin.titleControl = label2;\r\n}) \r\n\r\nvar btn2 = Ti.UI.createButton({\r\n\ttop:45,\r\n\theight:30,\r\n\ttitle:'Test Image'\r\n})\r\n\r\nbtn2.addEventListener('click',function(){\r\n\twin.titleControl = titleImage;\r\n}) \r\n\r\nvar btn3 = Ti.UI.createButton({\r\n\ttop:80,\r\n\theight:30,\r\n\ttitle:'Test View'\r\n})\r\n\r\nbtn3.addEventListener('click',function(){\r\n\twin.titleControl = titleView;\r\n}) \r\n\r\nwin.add(btn1);\r\nwin.add(btn2);\r\nwin.add(btn3); \r\n//win.open();\r\ntabGroup.addTab(tab1); \r\ntabGroup.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-04T16:39:57.000+0000", "updated": "2012-05-04T16:39:57.000+0000" }, { "id": "193858", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Adding merge label since TIMOB-8613 was merged into 2_0_X", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-04T16:42:30.000+0000", "updated": "2012-05-04T16:42:30.000+0000" }, { "id": "194677", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 2.0.2.v20120510223154 on iPhone 4 5.0.1", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-14T10:26:20.000+0000", "updated": "2012-05-14T10:26:20.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }