{ "id": "172536", "key": "TIMOB-26509", "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": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-03-07T21:18:25.000+0000", "created": "2018-11-01T10:28:03.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-11-11T09:39:23.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": "There have been some improvements regarding search-bars (TIMOB-25287) lately. One specific behavior is still missing though: Displaying the search-bar as part of the navigation-bar (iOS 11+).\r\n\r\nMore infos and details on the implementation can be found here: \r\n- https://medium.com/@PavelGnatyuk/large-title-and-search-in-ios-11-514d5e020cee\r\n- https://stackoverflow.com/questions/45350035/ios-11-searchbar-in-navigationbar\r\n", "attachment": [ { "id": "65798", "filename": "6ApdI.png", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-11-01T10:27:53.000+0000", "size": 133574, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Allow Ti.UI.SearchBar to be displayed in navigation-bar", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "443192", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "body": "Thanks for adding this Hans. Really need this for a new app I am building.", "updateAuthor": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2018-11-01T14:50:26.000+0000", "updated": "2018-11-01T14:50:26.000+0000" }, { "id": "444569", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Can this be scheduled? We'd be fine cherry-picking this into our own SDK if the milestone is a bit away. I know [~vijaysingh] (hey man!) worked on search-bars and will probably be able to extend the search-bar to be presented inside a container without many changes. \r\n\r\nAs I can see it in the code, it right now uses a fixed frame for the search-bar, which would be auto-managed by the navigation-bar when being embedded in it.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-12-13T06:13:50.000+0000", "updated": "2018-12-13T06:13:50.000+0000" }, { "id": "444573", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel]\r\nLet me schedule it for 8.1.0. We'll work on it as soon as we get free from 8.0.0.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-13T09:44:22.000+0000", "updated": "2018-12-13T09:44:22.000+0000" }, { "id": "445704", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hey [~mdelmarter] [~hknoechel],\r\n\r\nI am planning to expose a property 'showSearchBarInNavigation' to Ti.UI.ListView, which will be create only.\r\nTest Case -\r\n\r\n{code:java}\r\n var rows = [];\r\n for (var i = 0; i < 20; i++) {\r\n var title = i ? 'Row '+ i : 'Close Window'\r\n rows.push({ properties: { title:title , backgroundColor: 'red', searchableText:title}});\r\n }\r\n \r\n var win = Ti.UI.createWindow({\r\n title: 'TEST',\r\n backgroundColor: 'white',\r\n });\r\n \r\n var nav = Ti.UI.iOS.createNavigationWindow({ \r\n window: win,\r\n });\r\n \r\n var sb = Ti.UI.createSearchBar();\r\n \r\n var ls = Ti.UI.createListSection({\r\n items: rows\r\n });\r\n \r\n var lv = Ti.UI.createListView({\r\n dimBackgroundForSearch: true,\r\n sections: [ls],\r\n searchView: sb,\r\n showSearchBarInNavBar: true\r\n });\r\n \r\n sb.setHintText(\"test\");\r\n sb.addEventListener('change', function(e){\r\n Ti.API.info(e.value);\r\n });\r\n sb.addEventListener('return', function(e){\r\n sb.blur();\r\n });\r\n win.add(lv);\r\n nav.open();\r\n{code}\r\n\r\nDo you guys have anything to add?\r\nThanks!", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-28T18:56:15.000+0000", "updated": "2019-02-05T18:32:20.000+0000" }, { "id": "445722", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Sounds great, thrilled to test it! Maybe you could also consider making it a property of the {{SearchBar}} directly, so people can embed it a search-bar to a navigation-bar without using a list-view / table-view. The search behavior should still be the same, it would just not be added to it's parent but to the navigation bar.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-01-28T23:03:03.000+0000", "updated": "2019-01-28T23:03:03.000+0000" }, { "id": "445796", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR - https://github.com/appcelerator/titanium_mobile/pull/10664\r\n\r\n\r\nTest Case (TiUIListView)- \r\n\r\n{code:java}\r\n var rows = [];\r\n for (var i = 0; i < 20; i++) {\r\n var title = i ? 'Row '+ i : 'Close Window'\r\n rows.push({ properties: { title:title , backgroundColor: 'red', searchableText:title}});\r\n }\r\n \r\n var win = Ti.UI.createWindow({\r\n title: 'TEST',\r\n backgroundColor: 'white',\r\n hidesSearchBarWhenScrolling: false\r\n });\r\n \r\n var nav = Ti.UI.createNavigationWindow({ \r\n window: win,\r\n });\r\n \r\n var sb = Ti.UI.createSearchBar({\r\n hintTextColor: 'white'\r\n });\r\n \r\n var ls = Ti.UI.createListSection({\r\n items: rows\r\n });\r\n \r\n var lv = Ti.UI.createListView({\r\n dimBackgroundForSearch: true,\r\n sections: [ls],\r\n searchView: sb,\r\n showSearchBarInNavBar: true\r\n });\r\n \r\n sb.setHintText(\"test\");\r\n sb.addEventListener('change', function(e){\r\n Ti.API.info(e.value);\r\n });\r\n \r\n sb.addEventListener('return', function(e){\r\n sb.blur();\r\n });\r\n \r\n win.add(lv);\r\n nav.open();\r\n{code}\r\n\r\nTest Case (TiUITableView)-\r\n\r\n{code:java}\r\n var rows = [];\r\n for (var i = 0; i < 10; i++) {\r\n var title = i ? 'Row '+ i : 'Close Window';\r\n rows.push({ title: title});\r\n }\r\n \r\n var win = Ti.UI.createWindow({\r\n backgroundColor: 'red',\r\n hidesSearchBarWhenScrolling: true\r\n });\r\n \r\n var sb = Ti.UI.createSearchBar({\r\n hintTextColor: 'blue'\r\n });\r\n var lv = Ti.UI.createTableView({\r\n data: rows,\r\n search: sb,\r\n showSearchBarInNavBar: true,\r\n });\r\n \r\n sb.setHintText(\"test\");\r\n sb.addEventListener('change', function(e){\r\n Ti.API.info(e.value);\r\n });\r\n \r\n sb.addEventListener('return', function(e){\r\n sb.blur();\r\n });\r\n \r\n sb.addEventListener('cancel', function(e){\r\n });\r\n lv.addEventListener('click', function(e) { \r\n })\r\n\r\n win.add(lv);\r\n var nav = Ti.UI.iOS.createNavigationWindow({ \r\n window: win,\r\n });\r\n nav.open();\r\n{code}\r\n ", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-02-01T00:08:01.000+0000", "updated": "2019-02-05T18:31:39.000+0000" }, { "id": "446001", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Everyone, for your info, Android already supports displaying a {{SearchBar}} or {{SearchView}} in the top {{ActionBar}} as shown in our code example linked below.\r\nhttps://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Android.SearchView\r\n\r\nAlthough it's recommended that you use {{Ti.UI.Android.SearchView}} which is Android's native implementation over Titanium's {{Ti.UI.SearchBar}} which is our custom implementation. In the future, we'll look into replacing our Android {{Ti.UI.SearchBar}} implementation with the native one.\r\n\r\n_(Thanks goes to [~ybanev] for digging into the Android side of this.)_", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-02-12T00:13:37.000+0000", "updated": "2019-02-12T00:13:37.000+0000" }, { "id": "446622", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on SDK 8.1.0.v20190307071609.Works fine.\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\n Memory = 17179869184\r\nNode.js\r\n Node.js Version = 8.12.0\r\n npm Version = 6.4.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.1.0.v20190307071609\r\n Cli =7.0.10 master 17\r\n Device = iPhone 6s iOS 12\r\nSimulator = iPhone 6 iOS 11.4\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-03-07T21:18:20.000+0000", "updated": "2019-03-07T21:18:20.000+0000" }, { "id": "446659", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~vijaysingh] We just integrated this into our app and noticed that the search-bar now is only visible when pulled down manually. Can this be controlled? Otherwise people will not know that a search even exists.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-03-10T19:02:25.000+0000", "updated": "2019-03-10T19:02:25.000+0000" }, { "id": "446660", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Video of the issue: https://www.dropbox.com/s/uvf2bi8vsqay902/bug.mov?dl=1", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-03-10T19:03:56.000+0000", "updated": "2019-03-10T19:03:56.000+0000" }, { "id": "446731", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] In same PR we have exposed Titanium.UI.Window.hidesSearchBarWhenScrolling, which can be used to show the search bar. Can you try same? Thanks!", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-03-11T18:27:45.000+0000", "updated": "2019-03-11T18:27:45.000+0000" }, { "id": "446738", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~vijaysingh] Unfortunately it flickers with that setting: https://www.dropbox.com/s/a2n99pgwczcm3gx/bug-2.mov?dl=1", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-03-11T20:59:42.000+0000", "updated": "2019-03-11T20:59:42.000+0000" }, { "id": "448507", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "body": "it's limited to use it with TableView or ListView right?", "updateAuthor": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-05-19T11:15:19.000+0000", "updated": "2019-05-19T11:15:19.000+0000" }, { "id": "452559", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "Hi guys, I discovered interesting thing - I set up everything as you do @Vijay but if I have LiveView turned on, on first run, it's working. If I refresh app via LiveView, searchbar is not displaying anymore anywhere. Also, hidesSearchBarWhenScrolling property of window is not working... Built with Ti SDK 8.2.1GA and tested with iPhone 11 Pro iOS 13 simulator.\r\nPlease look at it. \r\nThanks", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2019-11-09T22:00:30.000+0000", "updated": "2019-11-09T22:00:30.000+0000" }, { "id": "452564", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~max87] can you create a new ticket with that finding and add a sample with it? Commenting on old closed/fixed tickets will not re-open them. ", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-11-11T09:39:23.000+0000", "updated": "2019-11-11T09:39:23.000+0000" } ], "maxResults": 20, "total": 20, "startAt": 0 } } }