{ "id": "63017", "key": "TIMOB-2385", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-05-02T20:11:46.000+0000", "created": "2011-04-15T03:18:21.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-05-02T21:13:05.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": "{html}

The following usecase demonstrates that the removeTab() method\r\ncurrently does not work. In the code, I've created a button that\r\nlistens for a click event that attempts to remove tab2 using\r\nremoveTab(tab2), so any output can be observed using logcat. The\r\ntab is not removed. I've also tried removeTab outside of the\r\neventlistener, both before and after the tabgroup is opened, with\r\nthe same result.

\r\n
\r\nvar tabGroup1 = Titanium.UI.createTabGroup();\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n    title:'Tab 1',\r\n    backgroundColor:'#fff'\r\n});\r\n\r\nvar tab1 = Titanium.UI.createTab({\r\n    icon:'KS_nav_views.png',\r\n    title:'Tab 1',\r\n    window:win1\r\n});\r\n\r\nvar button1 = Ti.UI.createButton({\r\n    title:'close tab',\r\n    top:100,\r\n    height:30,\r\n    width:120\r\n});\r\n\r\nwin1.add(button1);\r\n\r\nvar win2 = Titanium.UI.createWindow({\r\n    title:'Tab 2',\r\n    backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({\r\n    icon:'KS_nav_ui.png',\r\n    title:'Tab 2',\r\n    window:win2\r\n});\r\n\r\nbutton1.addEventListener('click', function(e){\r\n    tabGroup1.removeTab(tab2);\r\n});\r\n\r\ntabGroup1.addTab(tab1);\r\ntabGroup1.addTab(tab2);\r\n\r\ntabGroup1.open();\r\ntabGroup1.removeTab(tab2);\r\n
{html}", "attachment": [], "flagged": false, "summary": "Android: tabGroup removeTab() method has no effect", "creator": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "128328", "author": { "name": "johnluther", "key": "johnluther", "displayName": "John Luther", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

are you sure this is low priority? it does not work for\nplatform.

{html}", "updateAuthor": { "name": "johnluther", "key": "johnluther", "displayName": "John Luther", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:18:22.000+0000", "updated": "2011-04-15T03:18:22.000+0000" }, { "id": "128329", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

The Android tab control does not support tab removal \nTabHost

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:18:22.000+0000", "updated": "2011-04-15T03:18:22.000+0000" }, { "id": "128330", "author": { "name": "tyler", "key": "tyler", "displayName": "Tyler", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Are there any updates or workarounds to this? This seems like a\npretty large bug to me..

{html}", "updateAuthor": { "name": "tyler", "key": "tyler", "displayName": "Tyler", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:18:22.000+0000", "updated": "2011-04-15T03:18:22.000+0000" }, { "id": "128331", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I repeat the Android native control DOES NOT support the remove\nof tabs. Until they do or we build the entire control it's not\ngoing to be fixed.

\n

The workaround is to design your application such that you don't\nneed to remove tabs.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:18:22.000+0000", "updated": "2011-04-15T03:18:22.000+0000" }, { "id": "128332", "author": { "name": "briankristiansen", "key": "briankristiansen", "displayName": "Brian Kristiansen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

It would be nice if the documentation said \"iPhone only\" like a\nlot of other functions/properties...

{html}", "updateAuthor": { "name": "briankristiansen", "key": "briankristiansen", "displayName": "Brian Kristiansen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:18:23.000+0000", "updated": "2011-04-15T03:18:23.000+0000" }, { "id": "133021", "author": { "name": "cwhittl", "key": "cwhittl", "displayName": "Chris Whittle", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is there any kind of workaround for this? We are working on an app that if we can get through it will build up to us purchasing a support package... ", "updateAuthor": { "name": "cwhittl", "key": "cwhittl", "displayName": "Chris Whittle", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-02T07:36:03.000+0000", "updated": "2011-05-02T07:36:03.000+0000" }, { "id": "133073", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "As Don has clearly stated, there is no native way to remove a tab. The closest is [clearAllTabs|http://developer.android.com/reference/android/widget/TabHost.html#clearAllTabs()], but the resulting effect when used in an app of removing all tabs and recreating/adding new tabs would not good.\n\nThus, this ticket will not be resolved, so propose that it be closed.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-05-03T02:04:36.000+0000", "updated": "2011-05-03T02:04:36.000+0000" }, { "id": "133074", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "See ticket TIMOB-3333", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-05-03T02:06:26.000+0000", "updated": "2011-05-03T02:06:26.000+0000" }, { "id": "215866", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120821095711, issue still valid. ", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-23T12:18:49.000+0000", "updated": "2012-08-23T12:18:49.000+0000" }, { "id": "232945", "author": { "name": "papillonstudios", "key": "papillonstudios", "displayName": "Chad Gregory", "active": true, "timeZone": "America/New_York" }, "body": "Im not sure if this is a good workaround but couldn't you just hide the tab group?", "updateAuthor": { "name": "papillonstudios", "key": "papillonstudios", "displayName": "Chad Gregory", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-03T07:58:43.000+0000", "updated": "2013-01-03T07:58:43.000+0000" }, { "id": "418676", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving ticket as Invalid as there is now a new version of Kitchen Sink available and we no longer support the version which relates to this ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-02T20:11:46.000+0000", "updated": "2017-05-02T20:11:46.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }