{ "id": "92034", "key": "TIMOB-11232", "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": "15699", "description": "2013 Sprint 21", "name": "2013 Sprint 21", "archived": true, "released": true, "releaseDate": "2013-10-18" }, { "id": "15700", "description": "2013 Sprint 21 API", "name": "2013 Sprint 21 API", "archived": true, "released": true, "releaseDate": "2013-10-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-08-14T00:45:35.000+0000", "created": "2012-05-20T12:45:37.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "module_tableview", "parity", "qe-manualtest" ], "versions": [ { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" }, { "id": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-08-14T00:45: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": "A headerview added to a tableview in android allocates space but does not show any children(or backgrounds) the way it does on iOS. Sample code below:\r\n\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n\r\nnavWindow = Ti.UI.createWindow();\r\n\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar data = [\r\n\t{title:'Alan', hasChild:true, header:'A'},\r\n\t{title:'Alice', hasDetail:true},\r\n\t{title:'Alexander'},\r\n\t{title:'Amos'},\r\n\t{title:'Alonzo'},\r\n\t{title:'Brad', header:'B'},\r\n\t{title:'Brent'},\r\n\t{title:'Billy'},\r\n\t{title:'Brenda'},\r\n\t{title:'Potsie'}\r\n];\r\n\r\n\tvar header=Ti.UI.createView({\r\n\t\twidth:'100%',\r\n\t\tbackgroundColor:'red',\r\n\t\theight:149\r\n\t});\r\n\t\r\n\t\r\n\t// Create a Label.\r\n\tvar aLabel = Ti.UI.createLabel({\r\n\t\ttext : 'aLabel',\r\n\t\tcolor : 'black',\r\n\t\tfont : {fontSize:22},\r\n\t\theight : 44,\r\n\t\twidth : 222,\r\n\t\ttop : 2,\r\n\t\tleft : 5,\r\n\t\ttextAlign : 'center'\r\n\t});\r\n\t\r\n\t// Add to the parent view.\r\n\theader.add(aLabel);\r\n\t\r\n\r\nvar tableview = Titanium.UI.createTableView({\r\n\tdata:data,\r\n\theaderView:header\r\n});\r\n\r\n\r\nwin1.add(tableview);\r\n\r\nwin1.open();\r\n{code}", "attachment": [ { "id": "36515", "filename": "iOS Simulator Screen shot Mar 21, 2013 2.59.04 PM.png", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-21T09:35:59.000+0000", "size": 16379, "mimeType": "image/png" }, { "id": "36516", "filename": "Screenshot_2013-03-21-15-02-34.png", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-21T09:35:59.000+0000", "size": 23435, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: TableView / HeaderView Android Parity Issue", "creator": { "name": "tvfoodmaps", "key": "tvfoodmaps", "displayName": "Frank Apap", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tvfoodmaps", "key": "tvfoodmaps", "displayName": "Frank Apap", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android (Simualtor & Device)\r\nMobile SDK 2.x (tested on multiple builds)", "comment": { "comments": [ { "id": "221685", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed parity issue on iOS 5.1 and Android emulator 2.3.3 with TiSDK 2.1.2 GA, 2.1.3 RC 2, 3.0.0.\n\nNot sure if this is platform specific behavior however, someone else will need to clarify this.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-01T23:23:34.000+0000", "updated": "2012-10-01T23:23:34.000+0000" }, { "id": "230432", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can also confirm that this behavior is still present in the latest 3.1.0 TiSDK build that I've been using, tested on Android emulator and my Galaxy Nexus (4.1.1). I came upon this creating a test app for Alloy. Works fine on iOS, but as this ticket states, the header/footer views allocate space but show no UI on android. For reference, the test app is here: https://github.com/appcelerator/alloy/tree/master/test/apps/ui/proxy_properties", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-07T20:01:52.000+0000", "updated": "2012-12-07T20:01:52.000+0000" }, { "id": "231219", "author": { "name": "salachi", "key": "salachi", "displayName": "sunil alachi", "active": true, "timeZone": "Asia/Kolkata" }, "body": "This should work if the width is specified as 'fill' instead of '100%'. \r\n\r\nSince the width is given in percentage, framework uses the parent width to calculate the width of the headerview. Since the parent (list) layout is not completed at this time, parent width is returned as 0 and hence the headerview is created with width set to 0.\r\n\r\nSee method layoutHeaderOrFooter in TiTableView.", "updateAuthor": { "name": "salachi", "key": "salachi", "displayName": "sunil alachi", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-12-13T16:43:08.000+0000", "updated": "2012-12-13T16:43:08.000+0000" }, { "id": "231222", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@sunil: In the alloy example I cited above, I don't use 100% for the width. In fact, I don't specify a width, which according to the docs should use Ti.UI.FILL by default. I still see this same behavior only on android.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-13T17:02:20.000+0000", "updated": "2012-12-13T17:02:20.000+0000" }, { "id": "231842", "author": { "name": "salachi", "key": "salachi", "displayName": "sunil alachi", "active": true, "timeZone": "Asia/Kolkata" }, "body": "oops, I missed the alloy sample, I was looking at the sample here. I will take a look at the alloy sample.", "updateAuthor": { "name": "salachi", "key": "salachi", "displayName": "sunil alachi", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-12-18T15:50:50.000+0000", "updated": "2012-12-18T15:50:50.000+0000" }, { "id": "231873", "author": { "name": "salachi", "key": "salachi", "displayName": "sunil alachi", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Based on the layout precedence documentation\r\n\"If width is defined, it takes precedence and the positioning pins are not used to determine the view's width. \r\n\r\nIf width is not defined, and at least two horizontal positioning pins are defined, the width is calculated implicitly from the pins. For example, left and right or left and center.x. If all three horizontal pins are defined, the width is determined by the left and center.x pins. If width cannot be implicitly calculated it follows the view's default sizing behavior.\"\r\n\r\nLooks like the default width and height for headerView is 'WRAP_CONTENT'. I think it would have been nice if the default for height was 'WRAP_CONTENT' and width be 'FILL'\r\n", "updateAuthor": { "name": "salachi", "key": "salachi", "displayName": "sunil alachi", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-12-18T18:00:44.000+0000", "updated": "2012-12-18T18:00:44.000+0000" }, { "id": "231874", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Great analysis. In the end, I don't care how it's handled so long as it is uniform across the supported platforms.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-18T18:07:35.000+0000", "updated": "2012-12-18T18:07:35.000+0000" }, { "id": "243368", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\nTitanium SDK version: 3.0.2 (02/07/13 16:46 a4def81)\nDevice: Samsung galaxy s duos Android version: 4.0.4\niOS iPhone Simulator: iOS SDK version: 6.0\n\njithinpv", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-21T09:35:05.000+0000", "updated": "2013-03-21T09:35:05.000+0000" }, { "id": "243898", "author": { "name": "qonstrukt", "key": "qonstrukt", "displayName": "Stefan Moonen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Another parity issue would be that HeaderViews on TableViewSections need to be set on creation, as opposed to iOS where they can be changed afterwards.", "updateAuthor": { "name": "qonstrukt", "key": "qonstrukt", "displayName": "Stefan Moonen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-03-25T11:36:15.000+0000", "updated": "2013-03-25T11:36:15.000+0000" }, { "id": "271062", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~qonstrukt] they can be set after creation, but not changed or removed: TC-2748", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-13T14:43:17.000+0000", "updated": "2013-09-13T14:43:17.000+0000" }, { "id": "271063", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "So, what's the status on this?\r\n\r\nBTW, on iOS on the other hand, regardless of what you set the header or footerView's {{width}} to, it will always FILL.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-13T14:44:15.000+0000", "updated": "2013-09-13T14:44:15.000+0000" }, { "id": "273950", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Set the width to be MATCH_PARENT for header and footer to be consistent with iPhone.\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4762", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-10-06T11:15:02.000+0000", "updated": "2013-10-06T11:15:02.000+0000" }, { "id": "274741", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "CR + FR", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-10T23:34:44.000+0000", "updated": "2013-10-10T23:34:44.000+0000" }, { "id": "276119", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Tested and confirmed fix on:\r\nDevice : HTC desire V , Android version : 4.0.3\r\nSDK: 3.2.0.v20131021142445\r\nCLI version : 3.2.0\r\nOS : MAC OSX 10.8.4\r\nAlloy : 1.2.2\r\nAppcelerator Studio, build: 3.2.0.201310181700\r\nXCode : 5", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-10-22T10:50:13.000+0000", "updated": "2013-10-22T10:50:13.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }