{ "id": "171341", "key": "AC-5664", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2018-03-18T16:11:42.000+0000", "created": "2018-03-18T09:43:34.000+0000", "labels": [ "7.1.0.GA", "barColor", "ios-11", "searchBar" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-03-19T04:04:06.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Hi, I have created a simple navigationWindow in Alloy.\r\nInside the window I have a listView with a searchBar.\r\nSearchBar barColor and backgroundColor do not make changes.\r\n{code:title=index.html|borderStyle=solid}\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n{code:title=index.tss|borderStyle=solid}\r\n\"#main\": {\r\n\ttitle: \"test\",\r\n\tlargeTitleEnabled: true\r\n}\r\n{code}\r\n\r\n{code:title=index.js|borderStyle=solid}\r\nvar counter = 0;\r\n\r\nfunction genData() {\r\n\tvar data = [];\r\n\tvar i = 1;\r\n\tfor (i = 1; i <= 3; i++) {\r\n\t\tdata.push({ properties: { title: 'ROW ' + (counter + i) } })\r\n\t}\r\n\tcounter += 3;\r\n\treturn data;\r\n}\r\nvar search = Titanium.UI.createSearchBar({\r\n barColor:'red', \r\n backgroungColor: 'green',\r\n showCancel:true,\r\n top:0,\r\n});\r\n\r\nvar section = Ti.UI.createListSection();\r\nsection.setHeaderTitle(\"title\");\r\nsection.setItems(genData());\r\n\r\nvar control = Ti.UI.createRefreshControl({\r\n\ttintColor: 'red'\r\n})\r\n\r\nvar listView = Ti.UI.createListView({\r\n\tsections: [section],\r\n\trefreshControl: control,\r\n searchView: search\r\n});\r\n\r\ncontrol.addEventListener('refreshstart', function(e) {\r\n\tTi.API.info('refreshstart');\r\n\tsetTimeout(function() {\r\n\t\tTi.API.debug('Timeout');\r\n\t\tsection.appendItems(genData());\r\n\t\tcontrol.endRefreshing();\r\n\t}, 100); //if setTimeout is about 1s the problem not occurs\r\n})\r\n\r\n$.main.add(listView);\r\n$.index.open();\r\n{code}\r\n\r\n\r\n", "attachment": [ { "id": "64976", "filename": "Simulator Screen Shot - iPhone 8 - 2018-03-18 at 10.40.42.png", "author": { "name": "flaviox83", "key": "flaviox83", "displayName": "Flavio Bontà", "active": true, "timeZone": "Europe/Rome" }, "created": "2018-03-18T09:41:00.000+0000", "size": 30960, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: SearchBar inside ListView barColor and backgroundColor not working", "creator": { "name": "flaviox83", "key": "flaviox83", "displayName": "Flavio Bontà", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "flaviox83", "key": "flaviox83", "displayName": "Flavio Bontà", "active": true, "timeZone": "Europe/Rome" }, "environment": "* Mac OS v10.12.6\r\n* Titanium SDK release v7.1.0.GA\r\n* node v8.9.3\r\n* npm v5.7.1\r\n* Simulator iPhone 8 iOS 11.2", "comment": { "comments": [ { "id": "435699", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey there! This should be fixed by TIMOB-25850 (cc [~vijaysingh]) and [this pull request|https://github.com/appcelerator/titanium_mobile/pull/9932] that you can use to patch your SDK today. I will resolve the ticket to indicate its relation, thank you for reporting this!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-18T16:11:34.000+0000", "updated": "2018-03-18T16:11:34.000+0000" }, { "id": "435705", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hans is correct, it will be fixed in above ticket.\r\nSimple workaround is - \r\n\r\nSet searchBar property after creating list view.\r\ne.g.\r\n\r\n{code:java}\r\nvar listView = Ti.UI.createListView({\r\n\tsections: [section],\r\n\trefreshControl: control,\r\n searchView: search\r\n});\r\n\r\nsearchView.setBarColor('red');\r\nsearchView.setBackgroungColor('green');\r\n{code}\r\n\r\nThanks!", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-19T04:04:06.000+0000", "updated": "2018-03-19T04:04:06.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }