{ "id": "133648", "key": "AC-1389", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-10-15T02:14:50.000+0000", "created": "2014-07-24T10:16:43.000+0000", "labels": [ "3.3.0.GA", "actionbar", "android", "appcompat" ], "versions": [], "issuelinks": [], "assignee": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "updated": "2016-03-08T07:37:48.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": [], "description": "Titanium.Android.ActionBar is not defined on Android version 2.3.7 (API 10) and prior. Since Titanium 3.3.0 using AppCombat this should be possible as the ActionBar is available.\r\n\r\nh3. Steps to reproduce:\r\n\r\n1. Create new default app\r\n2. Copy below example code into app.js\r\n3. Run on Android emulator / device with Android 2.3.7 (API 10)\r\n\r\nh3. Expected result:\r\n{{actionbar}} should return a valid reference\r\n\r\nh3. Actual result:\r\n{{actionbar}} is {{undefined}}\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nwin.addEventListener('open', doOpen);\r\n\r\nfunction doOpen(){\r\n var activity = win.activity;\r\n var actionbar = activity.actionbar;\r\n \r\n Ti.API.info(activity);\r\n Ti.API.info(actionbar);\r\n}\r\n\r\nwin.open();\r\n{code}\r\n\r\n\r\nQ&A: http://developer.appcelerator.com/question/176443/hide-actionbar-on-tisdk330-with-android-2x-devices", "attachment": [], "flagged": false, "summary": "Actionbar is undefined on Android < 3.0", "creator": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "environment": "CLI version 3.3.0\r\nTitanium SDK version 3.3.0.GA\r\nAlloy 1.4.0\r\nTitanium Studio build: 3.3.0.201407100905\r\n\r\n", "comment": { "comments": [ { "id": "316608", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Hi,\r\n\r\nCan you try this sample code in your device, as it works in my android 2.3.6.\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n title: \"Old Title\",\r\n navBarHidden: false\r\n});\r\nvar actionBar;\r\n\r\nwin.addEventListener(\"open\", function() {\r\n if (Ti.Platform.osname === \"android\") {\r\n if (! win.activity) {\r\n Ti.API.error(\"Can't access action bar on a lightweight window.\");\r\n } else {\r\n actionBar = win.activity.actionBar;\r\n if (actionBar) {\r\n actionBar.backgroundImage = \"/bg.png\";\r\n actionBar.title = \"New Title\";\r\n actionBar.onHomeIconItemSelected = function() {\r\n Ti.API.info(\"Home icon clicked!\");\r\n };\r\n }\r\n }\r\n }\r\n});\r\n\r\nwin.open();\r\n{code}\r\n", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-08-01T06:28:31.000+0000", "updated": "2014-08-01T06:28:31.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }