{ "id": "133196", "key": "TIMOB-17558", "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": "2014-08-28T10:24:32.000+0000", "created": "2014-07-15T16:26:34.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "TCSupport", "android" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-27T20:23:25.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 creating an Android app with action bar followed by a tab group on Titanium 3.3.0.RC all works fine, but once try to display only text in the action bar, the app's tabs and action bar switch position.\r\n\r\nIf we set title property and setDisplayShowTitleEnabled(true) set true in actionBar then we can reproduces this issue. \r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project (classic titanium)\r\n2. Paste the test code into app.js\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 1',\r\n\tbackgroundColor : '#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({\r\n\ticon : 'KS_nav_views.png',\r\n\ttitle : 'Tab 1',\r\n\twindow : win1\r\n});\r\n\r\nvar win2 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 2',\r\n\tbackgroundColor : '#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({\r\n\ticon : 'KS_nav_ui.png',\r\n\ttitle : 'Tab 2',\r\n\twindow : win2\r\n});\r\n\r\nvar win3 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 3',\r\n\tbackgroundColor : '#fff'\r\n});\r\nvar tab3 = Titanium.UI.createTab({\r\n\ticon : 'KS_nav_ui.png',\r\n\ttitle : 'Tab 3',\r\n\twindow : win3\r\n});\r\n\r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\ntabGroup.addTab(tab3);\r\n\r\ntabGroup.addEventListener(\"open\", function(e) {\r\n\tvar activity = tabGroup.getActivity();\r\n\tvar actionBar = activity.actionBar;\r\n\t actionBar.title = 'Title';\r\n\t\r\n\t actionBar.setDisplayHomeAsUp( true );\r\n\tactionBar.setDisplayShowHomeEnabled(false);\r\n\tactionBar.setDisplayShowTitleEnabled(true);\r\n\tactivity.onCreateOptionsMenu = function(e) {\r\n\t\tvar item, menu;\r\n\t\tmenu = e.menu;\r\n\t\tmenu.clear();\r\n\r\n\t\titem = menu.add({\r\n\t\t\ttitle : \"Tab1 Item\",\r\n\t\t\tshowAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS\r\n\t\t});\r\n\r\n\t};\r\n});\r\n\r\ntabGroup.addEventListener(\"focus\", function(e) {\r\n\ttabGroup.getActivity().invalidateOptionsMenu();\r\n});\r\n\r\n// open tab group\r\ntabGroup.open();\r\n\r\n{code}\r\n3. Run it in simulator\r\n\r\nh4. Extra information \r\nHere's the original link to the question:\r\nhttp://developer.appcelerator.com/question/176150/odd-behaviour-when-using-tabgroup--actionbar", "attachment": [ { "id": "50831", "filename": "Screenshot_2014-08-28-15-37-43.png", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-28T10:23:35.000+0000", "size": 34622, "mimeType": "image/png" }, { "id": "49767", "filename": "Screen Shot 2014-07-15 at 5.16.50 PM.png", "author": { "name": "joseandro", "key": "joseandro", "displayName": "Joseandro Luiz", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2014-07-15T16:26:34.000+0000", "size": 46574, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Odd behaviour when using TabGroup + ActionBar", "creator": { "name": "joseandro", "key": "joseandro", "displayName": "Joseandro Luiz", "active": true, "timeZone": "America/Sao_Paulo" }, "subtasks": [], "reporter": { "name": "joseandro", "key": "joseandro", "displayName": "Joseandro Luiz", "active": true, "timeZone": "America/Sao_Paulo" }, "environment": "OS X 10.9.3 and Android 4.3\r\nMac OS X\r\nTitanium SDK 3.2.X.GA\r\nTi CLI 3.2.3 \r\nAndroid Emulator API level 19", "comment": { "comments": [ { "id": "316244", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello!\r\n\r\nCan you please provide a testcase in the form of app.js? \r\n\r\nThanks!\r\n\r\nBest Regards,\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-30T04:52:19.000+0000", "updated": "2014-07-30T04:52:19.000+0000" }, { "id": "316269", "author": { "name": "joseandro", "key": "joseandro", "displayName": "Joseandro Luiz", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "It's in the link that I posted:\r\nhttps://gist.github.com/joseandro/99e202816e8928927fc2\r\n\r\nThanks", "updateAuthor": { "name": "joseandro", "key": "joseandro", "displayName": "Joseandro Luiz", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2014-07-30T11:16:02.000+0000", "updated": "2014-07-30T11:16:02.000+0000" }, { "id": "320773", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce in \r\nTitanium SDK version 3.4.0 master, 3.3.0.GA \r\n\r\nShows a Runtime Error in \r\nTitanium SDK version 3.2.3.G.A\r\n\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", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-28T10:15:24.000+0000", "updated": "2014-08-28T10:15:24.000+0000" }, { "id": "415920", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as I am unable to reproduce this issue with the following environment;\r\nPixel (7.1)\r\nMacOS 10.11.6 (15G31)\r\nStudio 4.8.1.201612050850\r\nTi SDK 6.0.3 GA\r\nAppc NPM 4.2.8\r\nAppc CLI 6.1.0\r\nTi CLI 5.0.11\r\nAlloy 1.9.5\r\nArrow 1.10.1\r\nXcode 8.2 (8C38)\r\nNode v4.6.0\r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-27T20:23:25.000+0000", "updated": "2017-03-27T20:23:25.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }