{ "id": "104303", "key": "TIMOB-11645", "fields": { "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true }, "parent": { "id": "104048", "key": "TIMOB-11601", "fields": { "summary": "Android: Expose ActionBar methods", "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 } } }, "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-11-13T22:06:31.000+0000", "created": "2012-11-02T00:37:14.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "actionbar", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-02-29T15:23:37.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": "We need to be able to set the title fo the action bar. We need to figure where we should be placing this API point in Titanium", "attachment": [], "flagged": false, "summary": "Android: Allow changing title of an action bar", "creator": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "226335", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test case:\n\n1. Set your target sdk version to 14 by adding the entry if your tiapp.xml\"\n{code}\n \n \n \n \n \n{code}\n\n2. Run the following code:\n{code}\nvar win = Ti.UI.createWindow({\n\tfullscreen : true,\n\tbackgroundColor : 'black'\n});\n\nwin.addEventListener('open', function() {\n\tvar actionBar = win.activity.actionBar;\n\tactionBar.setTitle('TITANIUM APP');\n});\n\nwin.open(); \n{code}\n\nExpect result:\nYou should see 'TITANIUM APP' as the title of the action bar", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-06T19:15:13.000+0000", "updated": "2012-11-06T19:15:13.000+0000" }, { "id": "227441", "author": { "name": "igorsantos07", "key": "igorsantos07", "displayName": "Igor Santos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Currently the title obeys the window title as expected.\r\n\r\nAlthough, I'm not able to change the ActionBar text while using a TabGroup. The ActionBar remains empty. I have tried to set title for the TabGroup, for the Tabs and for the Window inside the active Tab:\r\n\r\n- TabGroup: does nothing\r\n- Tab: obviously changes the title in the tab only\r\n- Window of Tab: does nothing\r\n\r\nI also have no idea about where to add that event listener, since my main object is a TabGroup and not a Window.", "updateAuthor": { "name": "igorsantos07", "key": "igorsantos07", "displayName": "Igor Santos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2012-11-15T06:26:02.000+0000", "updated": "2012-11-15T06:26:02.000+0000" }, { "id": "227617", "author": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Good catch, Igor. Yes, it seems like the actionBar property is not getting set on windows in TabGroups. I'll open a ticket.\n\n", "updateAuthor": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-15T23:55:34.000+0000", "updated": "2012-11-15T23:55:34.000+0000" }, { "id": "243379", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "'TITANIUM APP' is displayed on the title of the action bar as expected.\r\nHence closing it.\r\n\r\nVerified on:\r\nDevice : Google Nexus 7, Android Version: 4.1\r\nSDK version: 3.1.0.v20130320190115 \r\nCLI version : 3.0.24\r\nOS : MAC OSX 10.7.5\r\nXCode : 4.5.1\r\n", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-03-21T10:27:38.000+0000", "updated": "2013-03-21T10:27:38.000+0000" }, { "id": "378151", "author": { "name": "olearyj234", "key": "olearyj234", "displayName": "James O'Leary", "active": true, "timeZone": "America/New_York" }, "body": "@Allen, The documentation for a window states that the activity property will be undefined if its a lightweight activity (aka if it's a window in a tabgroup). Instead of trying to get the activity reference from the window, you must get it from the tabgroup instead.\r\n\r\n\r\n{code:java}\r\nvar tabGroup = .........;\r\ntabGroup.addEventListener('open', function() {\r\n\tvar actionBar = tabGroup.activity.actionBar;\r\n\tactionBar.setTitle('TITANIUM APP');\r\n});\r\n{code}\r\n\r\n", "updateAuthor": { "name": "olearyj234", "key": "olearyj234", "displayName": "James O'Leary", "active": true, "timeZone": "America/New_York" }, "created": "2016-02-29T15:23:37.000+0000", "updated": "2016-02-29T15:23:37.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }