{ "id": "153731", "key": "TIMOB-23281", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-05-09T10:34:49.000+0000", "created": "2015-12-09T15:27:48.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "backgroundColor", "ios", "listView", "searchBar" ], "versions": [], "issuelinks": [ { "id": "56505", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "171634", "key": "TIMOB-26021", "fields": { "summary": "iOS: Search results table-view background color change", "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": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-05-09T10:35:30.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 have a window with backgroundImage and a listView with backgroundColor transparent and labels of all item white.\r\nWhen I click on searchBar and start typing the backgroundColor of listView became white and the results are unreadable because item's labels have the same color of background.\r\n\r\nAndroid work fine with the same component Ti.UI.createSearchBar", "attachment": [ { "id": "57730", "filename": "0.png", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2015-12-09T17:19:30.000+0000", "size": 1087121, "mimeType": "image/png" }, { "id": "57729", "filename": "1.png", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2015-12-09T17:19:45.000+0000", "size": 667623, "mimeType": "image/png" }, { "id": "57728", "filename": "2.png", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2015-12-09T17:19:44.000+0000", "size": 166627, "mimeType": "image/png" }, { "id": "57727", "filename": "3.png", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2015-12-09T17:19:54.000+0000", "size": 168807, "mimeType": "image/png" } ], "flagged": false, "summary": "Search Bar: search results listview background color change", "creator": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "environment": null, "closedSprints": [ { "id": 722, "state": "closed", "name": "2016 Sprint 20 SDK", "startDate": "2016-09-28T16:50:17.299Z", "endDate": "2016-10-12T16:50:00.000Z", "completeDate": "2016-10-10T06:17:01.016Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "372596", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, See the below code. I used opacity in the listview. The list items are visible.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundImage : '111.jpg',\r\n fullscreen : true\r\n});\r\nvar search = Titanium.UI.createSearchBar({\r\n barColor : '#000',\r\n showCancel : true,\r\n height : 43,\r\n top : 0,\r\n});\r\nsearch.addEventListener('cancel', function() {\r\n search.blur();\r\n});\r\n\r\nvar listView = Ti.UI.createListView({\r\n searchView : search,\r\n caseInsensitiveSearch : true,\r\n backgroundColor : '#3399CC',\r\n opacity : 0.5\r\n});\r\n\r\nvar listSection = Ti.UI.createListSection();\r\nvar fruits = ['Papaya', 'Peach', 'Pear', 'Persimmon', 'Pineapple', 'Pluot', 'Pomegranate'];\r\nvar data = [];\r\nfor (var i = 0; i < fruits.length; i++) {\r\n data.push({\r\n properties : {\r\n title : fruits[i],\r\n searchableText : fruits[i]\r\n }\r\n });\r\n}\r\nlistSection.setItems(data);\r\nlistView.addEventListener('noresults', function(e) {\r\n alert(\"No results found!\");\r\n});\r\nlistView.sections = [listSection];\r\nwin.add(listView);\r\nwin.open();\r\n{code}\r\n\r\nHope this helps, Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-12-10T06:48:09.000+0000", "updated": "2015-12-10T06:48:09.000+0000" }, { "id": "372635", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "body": "Thank you for you solution but I don't like very much.\r\nHere my code with the bug:\r\n\r\n\r\n{code:java}\r\n\tvar win = Ti.UI.createWindow({\r\n\t backgroundColor : '#000',\r\n\t fullscreen : true\r\n\t});\r\n\tvar search = Titanium.UI.createSearchBar({\r\n\t barColor : '#000',\r\n\t showCancel : true,\r\n\t height : 43,\r\n\t top : 0,\r\n\t});\r\n\tsearch.addEventListener('cancel', function() {\r\n\t search.blur();\r\n\t});\r\n\t \r\n\tvar listView = Ti.UI.createListView({\r\n\t searchView : search,\r\n\t caseInsensitiveSearch : true,\r\n\t backgroundColor : 'transparent',\r\n\t //opacity : 0.5\r\n\t templates: {\"a\": {\r\n\t\t properties : {\r\n\t\t backgroundColor: 'transparent'\r\n\t\t },\r\n\t\t childTemplates : [\r\n\t\t {\r\n\t\t type : 'Ti.UI.Label',\r\n\t\t bindId : 'bindLabel',\r\n\t\t properties : {\r\n\t\t color: '#fff'\r\n\t\t }\r\n\t\t \r\n\t\t }\r\n\t\t ]\r\n\t\t }\r\n\t }\r\n\t});\r\n\t \r\n\tvar listSection = Ti.UI.createListSection();\r\n\tvar fruits = ['Papaya', 'Peach', 'Pear', 'Persimmon', 'Pineapple', 'Pluot', 'Pomegranate'];\r\n\tvar data = [];\r\n\tfor (var i = 0; i < fruits.length; i++) {\r\n\t data.push({\r\n\t \ttemplate : 'a',\r\n\t properties : {\r\n\t searchableText : fruits[i]\r\n\t },\r\n\t bindLabel: {\r\n\t \ttext : fruits[i]\r\n\t }\r\n\t });\r\n\t}\r\n\tlistSection.setItems(data);\r\n\tlistView.addEventListener('noresults', function(e) {\r\n\t alert(\"No results found!\");\r\n\t});\r\n\tlistView.sections = [listSection];\r\n\twin.add(listView);\r\n\twin.open();\r\n{code}", "updateAuthor": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2015-12-10T19:13:25.000+0000", "updated": "2015-12-10T19:14:54.000+0000" }, { "id": "372771", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, This is a default searchbar behavior. It's not a bug. This is the way it has worked on iOS for a long time now. The only answer would appear to be to modify the source. Here are some of the link ou can follow \r\n\r\n1. [Link1|http://developer.appcelerator.com/question/155212/searchbar-results-tableviews-background-color-doesnt-change-can-it-be-a-bug].\r\n2. [Link2|https://developer.appcelerator.com/question/151120/change-background-color-of-empty-search-result-rows].\r\n\r\nHope this helps, Thanks. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-12-13T09:49:38.000+0000", "updated": "2015-12-13T09:49:38.000+0000" }, { "id": "384091", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Reopening, it's a valid improvement.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-27T16:58:51.000+0000", "updated": "2016-04-27T16:58:51.000+0000" }, { "id": "385759", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "body": "Any news about it?", "updateAuthor": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2016-05-16T06:42:38.000+0000", "updated": "2016-05-16T06:42:38.000+0000" }, { "id": "385993", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey there! We recently had a discussion about the interface architecture of this API on Github and the changes are in place. The PR is coming over the next 1-2 days. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-05-18T04:54:57.000+0000", "updated": "2016-05-18T04:54:57.000+0000" }, { "id": "386005", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "body": "Fantastic!! Thank you very much!", "updateAuthor": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2016-05-18T06:25:12.000+0000", "updated": "2016-05-18T06:25:12.000+0000" }, { "id": "386064", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8006\r\nNote: Please do not merge before next week, since it's dated for 6.0.0\r\n\r\n[~otto.pic] can you test the changes? Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-05-18T17:05:12.000+0000", "updated": "2016-05-18T17:05:12.000+0000" }, { "id": "386084", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "body": "Hans Knoechel, sure, I can test it in my app, but I have never done it before, can you explain me how to procede? Should I replace the files in my sdk?\r\n\r\nThanks\r\n", "updateAuthor": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2016-05-18T18:42:54.000+0000", "updated": "2016-05-18T18:42:54.000+0000" }, { "id": "386085", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Probably the easiest way to proceed, yes. You can replace it in {{~/Library/Application Support/Titanium/mobilesdk/osx//iphone/Classes/TiUiListView.m}}. Written from the brain, place verify the path. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-05-18T18:47:57.000+0000", "updated": "2016-05-18T18:47:57.000+0000" }, { "id": "386104", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "body": "I have tried to replace TiUiListView.m in my current sdk 5.2.2 and set resultsBackgroundColor: 'transparent' to my listview but I have not obtained transparent results. Any suggests?\r\n", "updateAuthor": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2016-05-18T21:18:50.000+0000", "updated": "2016-05-18T21:18:50.000+0000" }, { "id": "386105", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "body": "I have tried with resultsBackgroundColor : 'red' and background result is correctly red, so the problem is the param \"transparent\"", "updateAuthor": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2016-05-18T21:24:20.000+0000", "updated": "2016-05-18T21:24:20.000+0000" }, { "id": "386144", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Code reviewed ok. As Lorenzo has mentioned, the param \"transparent\" is not working for resultsBackgroundColor.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-05-19T03:52:37.000+0000", "updated": "2016-05-19T03:52:37.000+0000" }, { "id": "387508", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "body": "Any news about it? Do you fixed transparency?", "updateAuthor": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2016-06-03T13:18:10.000+0000", "updated": "2016-06-03T13:18:10.000+0000" }, { "id": "387509", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Unfortunately not, yet. It seems to make problems on the native side as well. Need more time to figure out a proper solution.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-06-03T13:24:19.000+0000", "updated": "2016-06-03T13:24:19.000+0000" }, { "id": "397610", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "Hi guys,\r\nI tried to set resultsBackgroundColor in my ListView constructor to red, but when I search listView, the backgroundColor is still white.\r\nCan you please post full example how to set this to make it work?\r\nThank you", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2016-09-29T07:40:38.000+0000", "updated": "2016-09-29T07:40:38.000+0000" }, { "id": "397623", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~max87] The improvement is not in the SDK, yet. See that this ticket has the status {{Open}}. Although every color works, I don't want to submit the changes to review when knowing that the transparent color does not work. Or we would need to be aware of that glitch which doesn't look solid to me.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-29T11:46:07.000+0000", "updated": "2016-09-29T11:46:07.000+0000" }, { "id": "397730", "author": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Marian Kucharcik you can use the unofficial fix by hans https://github.com/appcelerator/titanium_mobile/pull/8006\r\nI'am using and it's works.\r\n\r\n@Hans. I can understand your non submission, it's not 100% perfect because you seems still have a issue with transparency. But 1) You fixed the bug and 2) you add setBackground and setSeparatorInset who are great functions. I know it's not perfect but maybe you should submit and display a warning for the transparency using ?\r\n\r\nFor all people who have to edit their latest sdk with your PR manually :)\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-30T10:08:10.000+0000", "updated": "2016-09-30T10:08:10.000+0000" }, { "id": "397853", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8006\r\n\r\nDemo (adjusted from above):\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#000',\r\n fullscreen: true\r\n});\r\nvar search = Titanium.UI.createSearchBar({\r\n barColor: '#000',\r\n showCancel: true,\r\n height: 43,\r\n top: 0,\r\n});\r\nsearch.addEventListener('cancel', function() {\r\n search.blur();\r\n});\r\n\r\nvar listView = Ti.UI.createListView({\r\n searchView: search,\r\n caseInsensitiveSearch: true,\r\n backgroundColor: 'transparent',\r\n\r\n // NEW since 6.1.0\r\n resultsBackgroundColor: \"red\",\r\n resultsSeparatorColor: \"green\",\r\n resultsSeparatorInsets: {\r\n left: 0\r\n },\r\n\r\n templates: {\r\n \"a\": {\r\n properties: {\r\n backgroundColor: 'transparent'\r\n },\r\n childTemplates: [{\r\n type: 'Ti.UI.Label',\r\n bindId: 'bindLabel',\r\n properties: {\r\n color: '#fff'\r\n }\r\n\r\n }]\r\n }\r\n }\r\n});\r\n\r\nvar listSection = Ti.UI.createListSection();\r\nvar fruits = ['Papaya', 'Peach', 'Pear', 'Persimmon', 'Pineapple', 'Pluot', 'Pomegranate'];\r\nvar data = [];\r\nfor (var i = 0; i < fruits.length; i++) {\r\n data.push({\r\n template: 'a',\r\n properties: {\r\n searchableText: fruits[i]\r\n },\r\n bindLabel: {\r\n text: fruits[i]\r\n }\r\n });\r\n}\r\nlistSection.setItems(data);\r\nlistView.addEventListener('noresults', function(e) {\r\n alert(\"No results found!\");\r\n});\r\nlistView.sections = [listSection];\r\nwin.add(listView);\r\nwin.open();\r\n{code}\r\n\r\nNotes:\r\nI updated the docs to 6.1.0 and added support for a transparent background-color hack. I still Apple prevents this natively, since the result will show the below list-view that will overlap the contents. This happens because the search-results list is natively above the main list-view. I used a hack to generate a white color with a 0.0001 opacity and left a note about the non-official support. I guess we are pretty good with that. Alternatively, we would not have set it and throw a warning if used.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-02T17:08:19.000+0000", "updated": "2016-10-02T17:08:19.000+0000" }, { "id": "397867", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "CR and FT Passed!", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-03T08:29:26.000+0000", "updated": "2016-10-03T08:29:26.000+0000" }, { "id": "400336", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "I tried to use it like Baharroth mentioned and it works! Great job guys, thank you.", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2016-11-03T13:37:36.000+0000", "updated": "2016-11-03T13:37:36.000+0000" }, { "id": "402573", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified improvement with the code provided by [~hansknoechel], Was able to see the background turn red when text was entered and that the text was still visible. \r\n*Environement* \r\n{code:java}\r\nAppcelerator Command-Line Interface, version 6.0.0\r\nIOS 9.3.4\r\nIphone 6+ \r\nOperating System Name: Mac OS X El Capitan\r\nOperating System Version: 10.11.6\r\nNode.js Version: 4.6.0\r\nnpm: 4.2.8\r\nTitanium CLI Version: 5.0.10\r\nTitanium SDK Version: 6.1.0.v20161204170304\r\nXcode: 8.0\r\nAppcelerator Studio: 4.8.0.201611121409\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-05T18:47:38.000+0000", "updated": "2016-12-05T18:48:19.000+0000" }, { "id": "437436", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~ewieber] We got an email today which referenced this ticket and said \"_This problem is resolved for Listview but not for Tableview. I think it's not a bug but the default behaviour on iOS, but with a black app interface.. it's a quite bad experience_.\"\r\nCan you try to reproduce? If it's valid, I'll reopen this ticket.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-07T17:58:30.000+0000", "updated": "2018-05-07T17:58:30.000+0000" }, { "id": "437443", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~amukherjee], [~hknoechel]: I am able to reproduce the issue in TableView. I am including code for an example that has a TableView example with the ListView example already in this ticket. Can we apply the changes made to ListView to TableView? The search results being on top of the contents is very annoying, but if Apple won't let us do anything about it, this is a good workaround.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'blue'\r\n});\r\n\r\n// TableView\r\nvar searchTable = Titanium.UI.createSearchBar({\r\n barColor: '#000',\r\n showCancel: true,\r\n height: 43,\r\n top: 0,\r\n});\r\n\r\nsearchTable.addEventListener('cancel', function() {\r\n searchTable.blur();\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n top: 20,\r\n height: 300,\r\n backgroundColor: 'transparent',\r\n data: [\r\n {title: 'Apples', backgroundColor: 'transparent', color: 'white'},\r\n {title: 'Bananas', backgroundColor: 'transparent', color: 'white'},\r\n {title: 'Carrots', backgroundColor: 'transparent', color: 'white'},\r\n {title: 'Potatoes', backgroundColor: 'transparent', color: 'white'}\r\n ],\r\n search: searchTable\r\n});\r\n\r\n//ListView\r\nvar searchList = Titanium.UI.createSearchBar({\r\n barColor: '#000',\r\n showCancel: true,\r\n height: 43,\r\n top: 0,\r\n});\r\n\r\nsearchList.addEventListener('cancel', function() {\r\n searchList.blur();\r\n});\r\n\r\nvar list = Ti.UI.createListView({\r\n backgroundColor: 'transparent',\r\n top: 350,\r\n height: 300,\r\n searchView: searchList,\r\n\r\n resultsBackgroundColor: 'red',\r\n resultsSeparatorColor: 'green',\r\n resultsSeparatorInsets: {\r\n left: 0\r\n },\r\n\r\n templates: {\r\n 'a': {\r\n properties: {\r\n backgroundColor: 'transparent'\r\n },\r\n childTemplates: [{\r\n type: 'Ti.UI.Label',\r\n bindId: 'bindLabel',\r\n properties: {\r\n color: '#fff'\r\n }\r\n\r\n }]\r\n }\r\n }\r\n});\r\n\r\nvar section = Ti.UI.createListSection();\r\nvar data = ['Apple', 'Banana', 'Carrots', 'Potatoes'];\r\nvar items = [];\r\nfor (var i = 0; i < data.length; i++) {\r\n items.push({\r\n template: 'a',\r\n properties: {\r\n searchableText: data[i]\r\n },\r\n bindLabel: {\r\n text: data[i]\r\n }\r\n });\r\n}\r\nsection.setItems(items);\r\nlist.sections = [section];\r\n\r\nwin.add(table);\r\nwin.add(list);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-05-07T22:30:55.000+0000", "updated": "2018-05-07T22:30:55.000+0000" }, { "id": "437487", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] has made PR for this only in ListView. Simply copying the code in TableView should work.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-09T06:54:22.000+0000", "updated": "2018-05-09T06:54:22.000+0000" }, { "id": "437488", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR - https://github.com/appcelerator/titanium_mobile/pull/10033\r\n\r\nTest Case - \r\n\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'blue'\r\n});\r\n \r\n// TableView\r\nvar searchTable = Titanium.UI.createSearchBar({\r\n barColor: '#000',\r\n showCancel: true,\r\n height: 43,\r\n top: 0,\r\n});\r\n \r\nsearchTable.addEventListener('cancel', function() {\r\n searchTable.blur();\r\n});\r\n \r\nvar table = Ti.UI.createTableView({\r\n top: 20,\r\n height: 300,\r\n backgroundColor: 'transparent',\r\n resultsBackgroundColor: 'red',\r\n resultsSeparatorColor: 'green',\r\n resultsSeparatorInsets: {\r\n left: 0\r\n },\r\n data: [\r\n {title: 'Apples', backgroundColor: 'transparent', color: 'white'},\r\n {title: 'Bananas', backgroundColor: 'transparent', color: 'white'},\r\n {title: 'Carrots', backgroundColor: 'transparent', color: 'white'},\r\n {title: 'Potatoes', backgroundColor: 'transparent', color: 'white'}\r\n ],\r\n search: searchTable\r\n});\r\n \r\n//ListView\r\nvar searchList = Titanium.UI.createSearchBar({\r\n barColor: '#000',\r\n showCancel: true,\r\n height: 43,\r\n top: 0,\r\n});\r\n \r\nsearchList.addEventListener('cancel', function() {\r\n searchList.blur();\r\n});\r\n \r\nvar list = Ti.UI.createListView({\r\n backgroundColor: 'transparent',\r\n top: 350,\r\n height: 300,\r\n searchView: searchList,\r\n \r\n resultsBackgroundColor: 'red',\r\n resultsSeparatorColor: 'green',\r\n resultsSeparatorInsets: {\r\n left: 0\r\n },\r\n \r\n templates: {\r\n 'a': {\r\n properties: {\r\n backgroundColor: 'transparent'\r\n },\r\n childTemplates: [{\r\n type: 'Ti.UI.Label',\r\n bindId: 'bindLabel',\r\n properties: {\r\n color: '#fff'\r\n }\r\n \r\n }]\r\n }\r\n }\r\n});\r\n \r\nvar section = Ti.UI.createListSection();\r\nvar data = ['Apple', 'Banana', 'Carrots', 'Potatoes'];\r\nvar items = [];\r\nfor (var i = 0; i < data.length; i++) {\r\n items.push({\r\n template: 'a',\r\n properties: {\r\n searchableText: data[i]\r\n },\r\n bindLabel: {\r\n text: data[i]\r\n }\r\n });\r\n}\r\nsection.setItems(items);\r\nlist.sections = [section];\r\n \r\nwin.add(table);\r\nwin.add(list);\r\nwin.open();{code}\r\n", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-09T07:11:53.000+0000", "updated": "2018-05-09T07:11:53.000+0000" }, { "id": "437501", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Closing ticket again, since the parity (Ti.UI.TableView) is handled in TIMOB-26021 to keep the versioning scope clean. ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-05-09T10:35:25.000+0000", "updated": "2018-05-09T10:35:25.000+0000" } ], "maxResults": 30, "total": 30, "startAt": 0 } } }