{ "id": "118863", "key": "AC-2034", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-09-17T22:40:23.000+0000", "created": "2013-08-21T14:48:43.000+0000", "labels": [ "actionbar", "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:59.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "The combination of using the Android Holo theme with a TabGroup and using {{Ti.Android.ActionBar.displayHomeAsUp}} in a second Window opened in one of the Tabs randomly results in a double ActionBar like shown in the attached screenshot.\r\n\r\nAs the XML layout next to the screenshot shows there are actually 2 Windows present, each with its own ActionBar.\r\n\r\nRemoving lines 12-14 from the {{app.js}} code below and the problem is gone, showing the cause lies in the {{displayHomeAsUp}} logic.\r\n\r\nh1. Steps to reproduce\r\n\r\n1. Generate a new empty project\r\n2. Replace the {{}} tag in {{tiapp.xml}} with:\r\n\r\n{code}\r\n \r\n 14 \r\n \r\n \r\n \r\n \r\n \r\n{code}\r\n\r\n3. Replace the contents of {{app.js}} with:\r\n\r\n{code}\r\nvar tabGroup = Ti.UI.createTabGroup({\r\n backgroundColor: \"white\"\r\n});\r\nvar win1 = Ti.UI.createWindow({\r\n title: \"Window 1\",\r\n backgroundColor: \"green\"\r\n});\r\nwin1.addEventListener('click', function () {\r\n var win2 = Ti.UI.createWindow({\r\n backgroundColor: 'red'\r\n });\r\n win2.addEventListener('open', function () {\r\n win2.activity.actionBar.setDisplayHomeAsUp(true);\r\n });\r\n tab1.open(win2);\r\n});\r\nvar tab1 = Ti.UI.createTab({\r\n window: win1,\r\n title: \"Tab 1\"\r\n});\r\ntabGroup.addTab(tab1);\r\ntabGroup.open();\r\n{code}\r\n\r\n4. Repeatedly tap the green window to open the red window and use the hardware back button to return. Every now and then you should see the described behavior.", "attachment": [ { "id": "41764", "filename": "Schermafbeelding 2013-08-21 om 15.55.53.png", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-08-21T14:48:43.000+0000", "size": 68065, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: actionBar.displayHomeAsUp randomly shows double actionBar", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK/CLI 3.1.2.GA\r\nSamsung Galaxy S2, Android 4.1.2", "comment": { "comments": [ { "id": "267493", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-08-21T17:15:37.000+0000", "updated": "2013-08-21T17:15:37.000+0000" }, { "id": "268548", "author": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "body": "I am getting this error randomly on my apps, it shows every other time or so, there is no telling when it will occur.", "updateAuthor": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "created": "2013-08-28T10:21:20.000+0000", "updated": "2013-08-28T10:21:20.000+0000" }, { "id": "268549", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Is this now fixed with TIMOB-14914?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-08-28T10:28:23.000+0000", "updated": "2013-08-28T10:28:23.000+0000" }, { "id": "271596", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~Fokke] Please reopen if this is still resolved even after we resolved the related bug.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-17T22:40:23.000+0000", "updated": "2013-09-17T22:40:23.000+0000" }, { "id": "271676", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Haven't seen it happening anymore, so thx.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-18T06:14:12.000+0000", "updated": "2013-09-18T06:14:12.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }