{ "id": "126717", "key": "TIMOB-16507", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "15931", "description": "2014 Sprint 05", "name": "2014 Sprint 05", "archived": true, "released": true, "releaseDate": "2014-03-14" }, { "id": "15932", "description": "2014 Sprint 05 API", "name": "2014 Sprint 05 API", "archived": true, "released": true, "releaseDate": "2014-03-14" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-02-28T22:41:39.000+0000", "created": "2014-02-21T19:31:36.000+0000", "priority": null, "labels": [ "listview", "module_listview", "qe-closed-3.3.0", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-04-25T09:06: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": "I'm using PullView to implement \"Release to refresh\" functionality, but the problem is that I can't change the background color above the PullView itself. When I scroll down more than the height of PullView some default grey background appears that I would like to change. See attached image for example.\r\n\r\nI'm also attaching a very simple app with listview only. The background color of pullview if pink, everything that appears above that pullview when you scroll down is always grey!\r\n\r\nP.S. If this area isn't a background and it has it's own name please change the title accordingly.", "attachment": [ { "id": "46111", "filename": "bg_color.png", "author": { "name": "levani", "key": "levani", "displayName": "levani", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-21T19:31:36.000+0000", "size": 326973, "mimeType": "image/png" }, { "id": "46113", "filename": "example.zip", "author": { "name": "levani", "key": "levani", "displayName": "levani", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-21T19:31:36.000+0000", "size": 1823721, "mimeType": "application/zip" }, { "id": "46112", "filename": "pink.png", "author": { "name": "levani", "key": "levani", "displayName": "levani", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-21T19:31:36.000+0000", "size": 356189, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Change pullView default background color in listView, tableView", "creator": { "name": "levani", "key": "levani", "displayName": "levani", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "levani", "key": "levani", "displayName": "levani", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "ios7,\r\nTitanium SDK 3.2.1", "comment": { "comments": [ { "id": "294851", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Sample code showing use of pullBackgroundColor on Ti.UI.View and noresults event in ListView\n\n{code}\nvar win = Ti.UI.createWindow({backgroundColor: 'white',fullscreen:true,layout:'vertical'});\nvar listView = Ti.UI.createListView({keepSectionsInSearch:true});\nvar sections = [];\n\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});\nvar fruitDataSet = [\n {properties: { title: 'Fig', searchableText: 'Fruits Apple'}},\n {properties: { title: 'Kiwi', searchableText: 'Fruits Banana'}},\n];\nfruitSection.setItems(fruitDataSet);\nsections.push(fruitSection);\n\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables'});\nvar vegDataSet = [\n {properties: { title: 'Carrots', searchableText: 'Vegetables Carrots'}},\n {properties: { title: 'Potatoes', searchableText: 'Vegetables Potatoes'}},\n];\nvegSection.setItems(vegDataSet);\n\nvar fishSection = Ti.UI.createListSection({ headerTitle: 'Fish'});\nvar fishDataSet = [\n {properties: { title: 'Cod', searchableText: 'Fish Cod'}},\n {properties: { title: 'Haddock', searchableText: 'Fish Haddock'}},\n];\nfishSection.setItems(fishDataSet);\nlistView.sections = sections;\nvar refreshCount = 0;\n\nfunction getFormattedDate(){\n var date = new Date();\n return date.getMonth() + '/' + date.getDate() + '/' + date.getFullYear() + ' ' + date.getHours() + ':' + date.getMinutes();\n}\n\nfunction resetPullHeader(){\n actInd.hide();\n imageArrow.transform=Ti.UI.create2DMatrix();\n if (refreshCount < 2) {\n imageArrow.show();\n labelStatus.text = 'Pull down to refresh...';\n labelLastUpdated.text = 'Last Updated: ' + getFormattedDate();\n } else {\n labelStatus.text = 'Nothing To Refresh';\n labelLastUpdated.text = 'Last Updated: ' + getFormattedDate();\n listView.removeEventListener('pull', pullListener);\n listView.removeEventListener('pullend', pullendListener);\n eventStatus.text = 'Removed event listeners.';\n }\n listView.setContentInsets({top:0}, {animated:true});\n}\n\nfunction loadTableData()\n{\n if (refreshCount == 0) {\n listView.appendSection(vegSection);\n } else if (refreshCount == 1) {\n listView.appendSection(fishSection);\n } \n refreshCount ++;\n resetPullHeader();\n}\n\nfunction pullListener(e){\n eventStatus.text = 'EVENT pull FIRED. e.active = '+e.active;\n if (e.active == false) {\n var unrotate = Ti.UI.create2DMatrix();\n imageArrow.animate({transform:unrotate, duration:180});\n labelStatus.text = 'Pull down to refresh...';\n } else {\n var rotate = Ti.UI.create2DMatrix().rotate(180);\n imageArrow.animate({transform:rotate, duration:180});\n if (refreshCount == 0) {\n labelStatus.text = 'Release to get Vegetables...';\n } else {\n labelStatus.text = 'Release to get Fish...';\n }\n }\n}\n\nfunction pullendListener(e){\n eventStatus.text = 'EVENT pullend FIRED.';\n \n if (refreshCount == 0) {\n labelStatus.text = 'Loading Vegetables...'; \n } else {\n labelStatus.text = 'Loading Fish...';\n }\n imageArrow.hide();\n actInd.show();\n listView.setContentInsets({top:80}, {animated:true});\n setTimeout(function(){\n loadTableData();\n }, 2000);\n}\n\nvar tableHeader = Ti.UI.createView({\n backgroundColor:'#e2e7ed',\n pullBackgroundColor: 'cyan',\n width:320, height:80\n});\n\nvar border = Ti.UI.createView({\n backgroundColor:'#576c89',\n bottom:0,\n height:2\n});\ntableHeader.add(border);\n\nvar imageArrow = Ti.UI.createImageView({\n image:'https://github.com/appcelerator/titanium_mobile/raw/master/demos/KitchenSink/Resources/images/whiteArrow.png',\n left:20, bottom:10,\n width:23, height:60\n});\ntableHeader.add(imageArrow);\n\nvar labelStatus = Ti.UI.createLabel({\n color:'#576c89',\n font:{fontSize:13, fontWeight:'bold'},\n text:'Pull down to refresh...',\n textAlign:'center',\n left:55, bottom:30,\n width:200\n});\ntableHeader.add(labelStatus);\n\nvar labelLastUpdated = Ti.UI.createLabel({\n color:'#576c89',\n font:{fontSize:12},\n text:'Last Updated: ' + getFormattedDate(),\n textAlign:'center',\n left:55, bottom:15,\n width:200\n});\ntableHeader.add(labelLastUpdated);\n\nvar actInd = Ti.UI.createActivityIndicator({\n left:20, bottom:13,\n width:30, height:30\n});\ntableHeader.add(actInd);\nlistView.pullView = tableHeader;\nlistView.addEventListener('pull', pullListener);\nlistView.addEventListener('pullend',pullendListener);\n\nvar eventStatus = Ti.UI.createLabel({\n font:{fontSize:13, fontWeight:'bold'},\n text: 'Event data will show here',\n})\n\nvar searchbar = Ti.UI.createSearchBar({\n showCancel: true,\n hintText: 'Search'\n});\n\nsearchbar.addEventListener('cancel',function(e){\n searchbar.value = '';\n searchbar.blur();\n listView.searchText = '';\n});\n\nsearchbar.addEventListener('return',function(e){\n listView.searchText = searchbar.value;\n searchbar.blur();\n});\n\nlistView.addEventListener('noresults',function(){\n alert('No results for searchText '+searchbar.value);\n})\n\nwin.add(eventStatus);\nwin.add(searchbar);\nwin.add(listView);\nwin.open();\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-02-26T22:10:34.000+0000", "updated": "2014-02-26T22:10:34.000+0000" }, { "id": "294852", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5391", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-02-26T22:12:00.000+0000", "updated": "2014-02-26T22:12:00.000+0000" }, { "id": "298126", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "Thanks for the update, As i am using the latest CI build, i was able to incorporate this functionality into my app.\r\n\r\nHowever the documentation is a little weird.\r\n\r\nThe \"pullBackgroundColor\" is listed as a property of the listView itself. Trying to set it there doesn't work, as it must set on the view contained by the pullView property. Having it as part of of listView and View make sense in this circumstance. But perhaps the functionality should also be part of the listView rather then view. Both?", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2014-03-20T19:49:13.000+0000", "updated": "2014-03-20T20:00:30.000+0000" }, { "id": "298472", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "@[~paul h]\npullBackgroundColor is a property of Ti.UI.View and so gets inherited by all UI components extending Ti.UI.View (ListView, TableView, Window, TabGroup etc). In theory you can assign a TableView or ListView as the pullView for another TableView/ListView (though I suspect it would not work as expected). ", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-24T20:16:02.000+0000", "updated": "2014-03-24T20:16:02.000+0000" }, { "id": "302353", "author": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified fix with below environment:\r\n\r\nAppc Studio: 3.3.0.201404211130\r\nSDK build: 3.3.0.v20140423155715\r\nacs: 1.0.14\r\nnpm: 1.3.2\r\nalloy: 1.4.0-dev\r\nCLI: titanium-3.3.0-dev\r\ntitanium-code-processor:1.1.1-beta1\r\nXcode: 5.1.1\r\nOsx: Mavericks(10.9.2)\r\nDevice: iPhone 5C(7.1)\r\n\r\nAble to change the color of area above the pullview through pullBackgroundColor property as expected. Hence Closing the issue.", "updateAuthor": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-24T06:52:27.000+0000", "updated": "2014-04-24T06:52:27.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }