{ "id": "129721", "key": "TIMOB-16910", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-11-10T23:43:09.000+0000", "created": "2014-04-27T19:57:13.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "actionbar", "android" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [ { "id": "42454", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "106334", "key": "TIMOB-13392", "fields": { "summary": "Android: Implement Scrollable Tabs", "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": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T18:18:28.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": "The following code works as expected on ICS+ devices, but destroys window content on Gingerbread. \r\nindex.js:\r\n{code}\r\n$.index.addEventListener('open', function() {\r\n\tvar actionBar = $.index.activity.actionBar;\r\n\tsetTimeout(function() {\r\n\t\tactionBar.setNavigationMode(Ti.Android.NAVIGATION_MODE_STANDARD);\r\n\t}, 5000);\r\n});\r\n\r\n$.index.open();\r\n{code}\r\n\r\nindex.xml:\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: ActionBar.setNavigationMode(STANDARD) hides window content on API 10 devices", "creator": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "subtasks": [], "reporter": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "environment": "Android SDK 3.3.0", "comment": { "comments": [ { "id": "302704", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Found the problem! In TiUIActionBarTabGroup.java, onTabUnselected gets called by the Android system when ActionBar.setNavigationMore(NAVIGATION_MODE_STANDARD) is called. This function calls FragmentTransaction.hide() on the tab's fragment. This apparently has no effect on ICS+, but on Gingerbread (where the support library goes into effect, since Fragments are API 11+), FragmentTransaction.hide indeed hides the view - thus the tab content is hidden when the navigation mode is changed.\r\n\r\nProposed solution: ActionBar.setNavigationMode(NAVIGATION_MODE_STANDARD) cannot be used alone in order to hide the tabs on Android. We need to expose a new property on the TabGroup, e.g. tabsEnabled which can be used to toggle the tabs (i.e. the setter will toggle the navigation mode). Then onTabUnselected will call FragmentTransaction.hide only if tabsEnabled == true. \r\n\r\nI will submit a PR for this soon.", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2014-04-28T14:31:15.000+0000", "updated": "2014-04-28T14:32:08.000+0000" }, { "id": "303009", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Great. Let us know when you have the PR ready and we would look at it at a priority.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-30T05:23:27.000+0000", "updated": "2014-04-30T05:23:27.000+0000" }, { "id": "303108", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "The swipe tabs PR https://github.com/appcelerator/titanium_mobile/pull/5651 takes care of this too, so close this if that one is accepted.", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2014-04-30T20:58:12.000+0000", "updated": "2014-04-30T20:58:12.000+0000" }, { "id": "303415", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket and associated PR to engineering for further evaluation.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-04T05:49:00.000+0000", "updated": "2014-05-04T05:49:00.000+0000" }, { "id": "307294", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Again - this ticket is fixed by my scrollable tabs PR, please don't do any engineering work on this issue.", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2014-06-03T05:49:21.000+0000", "updated": "2014-06-03T05:49:21.000+0000" }, { "id": "318736", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3.4.0 is moved forward, and 3.5.0 is taking its place in the calendar.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-14T21:31:53.000+0000", "updated": "2014-08-14T21:31:53.000+0000" }, { "id": "318769", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "If you accept the PR for TIMOB-13392 for 3.4.0, as currently scheduled, then this one is already fixed by that PR.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-14T22:48:41.000+0000", "updated": "2014-10-28T14:49:49.000+0000" }, { "id": "329722", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "[~ingo] this will be taken care of by merging this https://github.com/appcelerator/titanium_mobile/pull/6008 - already reviewed by [~hpham] and [~pwang]", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2014-10-28T09:39:38.000+0000", "updated": "2014-10-28T09:39:38.000+0000" }, { "id": "331434", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "You should just close this ticket since ActionBar.setNavigationMode is deprecated in API 21, and once we fully move over to that AppCompat lib (and require targetSdkVersion=21+) this API should no longer be exposed.", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2014-11-10T20:50:27.000+0000", "updated": "2014-11-10T20:50:27.000+0000" }, { "id": "331492", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving as won't fix since this method is now deprecated on the new ActionBar version.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-10T23:43:09.000+0000", "updated": "2014-11-10T23:43:09.000+0000" }, { "id": "414262", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T18:18:28.000+0000", "updated": "2017-03-21T18:18:28.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }