{ "id": "121215", "key": "TIMOB-15496", "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": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2018-10-05T14:54:45.000+0000", "created": "2013-10-15T15:27:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "SupportTeam" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [ { "id": "56877", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172171", "key": "TIMOB-26354", "fields": { "summary": "Android: Refactor TabGroup and introduce new style", "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": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2018-10-05T14:54:45.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": "h4. Problem Description\r\nWhen adding a menuItem to the actionBar with an actionView and {code}showAsAction : Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW | Ti.Android.SHOW_AS_ACTION_ALWAYS{code} to a TabGroup, the item never expands to show the actionView. This is with a TabGroup, and nothing happens when i click the 'search' icon.\r\n\r\nh4. Test Case\r\n\r\n{code:javascript}var win = Ti.UI.createTabGroup({\r\n backgroundColor: 'blue',\r\n fullscreen: false\r\n});\r\nvar tab = Ti.UI.createTab({title: \"test\"});\r\nvar tabWin = Ti.UI.createWindow({title: \"testWin\"});\r\ntab.window = tabWin;\r\nwin.add(tab);\r\n\r\nvar search;\r\nvar searchAsChild = false;\r\n\r\nif (Ti.Platform.name == 'android' && Ti.Platform.Android.API_LEVEL > 11) {\r\n // Use action bar search view\r\n search = Ti.UI.Android.createSearchView({\r\n hintText: \"Table Search\"\r\n });\r\n\r\n\twin.addEventListener(\"open\", function(e) {\r\n win.getActivity().onCreateOptionsMenu = function(e) {\r\n var menu = e.menu;\r\n var menuItem = menu.add({\r\n title: 'Table Search',\r\n actionView : search,\r\n icon: (Ti.Android.R.drawable.ic_menu_search ? Ti.Android.R.drawable.ic_menu_search : \"my_search.png\"),\r\n showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM | Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW\r\n });\r\n };\r\n\t});\r\n}\r\nelse {\r\n // Use search bar\r\n search = Ti.UI.createSearchBar({\r\n hintText: \"Table Search\"\r\n });\r\n searchAsChild = true;\r\n}\r\n\r\nvar data = [];\r\ndata.push(Ti.UI.createTableViewRow({title:'Apple'}));\r\ndata.push(Ti.UI.createTableViewRow({title:'Banana'}));\r\ndata.push(Ti.UI.createTableViewRow({title:'Orange'}));\r\ndata.push(Ti.UI.createTableViewRow({title:'Raspberry'}));\r\n\r\nvar tableview = Titanium.UI.createTableView({\r\n data:data,\r\n search:search,\r\n searchAsChild:searchAsChild\r\n});\r\n\r\nwin.add(tableview);\r\nwin.open();{code}\r\n\r\nh4. Extra info \r\nHowever, when i try it with a Window instead of a TabGroup, it does work: (note: this is identical to previous case except for changing the tabgroup to a window)\r\n{code:javascript}var win = Ti.UI.createWindow({\r\n backgroundColor: 'blue',\r\n fullscreen: false\r\n});\r\n//var tab = Ti.UI.createTab({title: \"test\"});\r\n//var tabWin = Ti.UI.createWindow({title: \"testWin\"});\r\n//tab.window = tabWin;\r\n//win.add(tab);\r\n\r\nvar search;\r\nvar searchAsChild = false;\r\n\r\nif (Ti.Platform.name == 'android' && Ti.Platform.Android.API_LEVEL > 11) {\r\n // Use action bar search view\r\n search = Ti.UI.Android.createSearchView({\r\n hintText: \"Table Search\"\r\n });\r\n\r\n\twin.addEventListener(\"open\", function(e) {\r\n win.getActivity().onCreateOptionsMenu = function(e) {\r\n var menu = e.menu;\r\n var menuItem = menu.add({\r\n title: 'Table Search',\r\n actionView : search,\r\n icon: (Ti.Android.R.drawable.ic_menu_search ? Ti.Android.R.drawable.ic_menu_search : \"my_search.png\"),\r\n showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM | Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW\r\n });\r\n };\r\n\t});\r\n}\r\nelse {\r\n // Use search bar\r\n search = Ti.UI.createSearchBar({\r\n hintText: \"Table Search\"\r\n });\r\n searchAsChild = true;\r\n}\r\n\r\nvar data = [];\r\ndata.push(Ti.UI.createTableViewRow({title:'Apple'}));\r\ndata.push(Ti.UI.createTableViewRow({title:'Banana'}));\r\ndata.push(Ti.UI.createTableViewRow({title:'Orange'}));\r\ndata.push(Ti.UI.createTableViewRow({title:'Raspberry'}));\r\n\r\nvar tableview = Titanium.UI.createTableView({\r\n data:data,\r\n search:search,\r\n searchAsChild:searchAsChild\r\n});\r\n\r\nwin.add(tableview);\r\nwin.open();{code}", "attachment": [], "flagged": false, "summary": "Android TabGroup's actionBar actionViews don't expand", "creator": { "name": "olmokramer", "key": "olmokramer", "displayName": "Olmo Kramer", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "olmokramer", "key": "olmokramer", "displayName": "Olmo Kramer", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android 4.3\r\nSDK 3.1.3.GA", "comment": { "comments": [ { "id": "289199", "author": { "name": "rbroecker@vater-gruppe.de", "key": "rbroecker@vater-gruppe.de", "displayName": "René Wilby", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can confirm that in TiAlloy 1.3 and SDK 3.2.0.GA on Android 4.1.2 and Android 4.3.", "updateAuthor": { "name": "rbroecker@vater-gruppe.de", "key": "rbroecker@vater-gruppe.de", "displayName": "René Wilby", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-22T10:09:51.000+0000", "updated": "2014-01-22T10:09:51.000+0000" }, { "id": "319683", "author": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "body": "+1 I have the same issue in my project", "updateAuthor": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-08-21T11:44:12.000+0000", "updated": "2014-08-21T11:44:12.000+0000" }, { "id": "323245", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces\r\n\r\nTitanium SDK version 3.4.0 master, 3.1.3.GA\r\nTitanium Studio, build: 3.3.0.201407100905\r\nTitanium Command-Line Interface\r\nCLI version 3.3.0, \r\nAndroid device : Motorola Moto G, Android version : 4.4.4\r\n\r\nNote : in SDK 3.4.0 master search button is displayed.", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T10:57:21.000+0000", "updated": "2014-09-12T10:57:21.000+0000" }, { "id": "442351", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "Tested with 7.0.0.GA the issue can't be reproduced. Closing as such.", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2018-10-05T14:54:36.000+0000", "updated": "2018-10-05T14:54:36.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }