{ "id": "114700", "key": "TIMOB-14215", "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": [ { "id": "15564", "description": "2013 Sprint 15 API", "name": "2013 Sprint 15 API", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15567", "description": "2013 Sprint 15", "name": "2013 Sprint 15", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-07-22T18:48:05.000+0000", "created": "2013-05-21T15:03:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "actionbar", "android", "holo", "navbarhidden" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "28951", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "114705", "key": "TIMOB-14216", "fields": { "summary": "Android: setDisplayHomeAsUp doesn't work on a window with the navBarHidden property set to true", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-10-21T23:14:42.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": "h1. The issue\r\n\r\nIt is not possible to create a window/tabgroup with the property *navBarHidden* set to *true*. Otherwise the app crashes with this error :\r\n\r\n{code} \r\n05-21 14:34:41.200: E/TiApplication(14621): (main) [98,98] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.1.0,2013/04/15 18:46,57634ef\r\n05-21 14:34:41.200: E/TiApplication(14621): java.lang.NullPointerException\r\n05-21 14:34:41.200: E/TiApplication(14621): \tat org.appcelerator.titanium.proxy.ActionBarProxy.handleSetTitle(ActionBarProxy.java:154)\r\n05-21 14:34:41.200: E/TiApplication(14621): \tat org.appcelerator.titanium.proxy.ActionBarProxy.handleMessage(ActionBarProxy.java:207)\r\n05-21 14:34:41.200: E/TiApplication(14621): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n05-21 14:34:41.200: E/TiApplication(14621): \tat android.os.Looper.loop(Looper.java:137)\r\n05-21 14:34:41.200: E/TiApplication(14621): \tat android.app.ActivityThread.main(ActivityThread.java:4507)\r\n05-21 14:34:41.200: E/TiApplication(14621): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n05-21 14:34:41.200: E/TiApplication(14621): \tat java.lang.reflect.Method.invoke(Method.java:511)\r\n05-21 14:34:41.200: E/TiApplication(14621): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)\r\n05-21 14:34:41.200: E/TiApplication(14621): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)\r\n05-21 14:34:41.200: E/TiApplication(14621): \tat dalvik.system.NativeStart.main(Native Method)\r\n{code}\r\n\r\nh1. Code to reproduce\r\n\r\napp.js :\r\n\r\n{code:javascript}\r\n(function() {\r\n\t// code with window\r\n\tvar win = Ti.UI.createWindow({navBarHidden: true, backgroundColor: '#F00'});\r\n\r\n\twin.addEventListener(\"open\", function(event) {\r\n\t var actionBar = event.source.getActivity().actionBar;\r\n\t if (actionBar) {\r\n\t actionBar.setTitle(\"Test\");\r\n\t }\r\n\t});\r\n\r\n\twin.open();\r\n\r\n\t// Code with tabbar\r\n\t/*var tabGroup = Ti.UI.createTabGroup({navBarHidden: true});\r\n\r\n\ttabGroup.addEventListener(\"open\", function() {\r\n\t var actionBar = tabGroup.getActivity().actionBar;\r\n\t if (actionBar) {\r\n\t actionBar.setTitle(\"Test\");\r\n\t }\r\n\t});\r\n\r\n\ttabGroup.open();*/\r\n})();\r\n{code}\r\n\r\ntiapp.xml :\r\n{code:xml}\r\n\r\n\r\n com.tab.test\r\n TabTest\r\n 1.0\r\n johndoe\r\n http://\r\n not specified\r\n not specified\r\n appicon.png\r\n false\r\n false\r\n default\r\n false\r\n false\r\n false\r\n false\r\n e96a483e-41b2-4212-b78a-910612e01548\r\n system\r\n \r\n \r\n Ti.UI.PORTRAIT\r\n \r\n \r\n Ti.UI.PORTRAIT\r\n Ti.UI.UPSIDE_PORTRAIT\r\n Ti.UI.LANDSCAPE_LEFT\r\n Ti.UI.LANDSCAPE_RIGHT\r\n \r\n \r\n \r\n 17\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n false\r\n true\r\n false\r\n false\r\n false\r\n \r\n 3.1.0.GA\r\n\r\n{code}\r\n\r\nh1. Devices used\r\n\r\nThis problem is only reproducible on devices using *Holo*.\r\nI have tested on these devices :\r\n\r\n- Samsung S2 (GT-I9100P), android 4.0.3 -> *crash* (supports Holo)\r\n- Nexus S, android 4.1.2 -> *crash* (supports Holo)\r\n- Samsung S3 (GT-I93000), android 4.1.2 -> *crash* (supports Holo)\r\n- HTC Desire HD A9191, android 2.2 -> *ok* (does not supports Holo)\r\n- Samsung GT-S5830, android 2.3.3 -> *ok* (does not support Holo)\r\n- HTC Wildfire A3333, android 2.2.1 -> *ok* (does not support Holo)", "attachment": [], "flagged": false, "summary": "Android: activity.actionBar incompatible with navBarHidden:true", "creator": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium API : 3.1.0.GA", "comment": { "comments": [ { "id": "253090", "author": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "body": "Note that if you change :\n\n{code:javascript}\nvar win = Ti.UI.createWindow({navBarHidden: true, backgroundColor: '#F00'});\n{code}\n\ninto :\n\n{code:javascript}\nvar win = Ti.UI.createWindow({navBarHidden: false, backgroundColor: '#F00'});\n{code}\n\nthe app will not crash", "updateAuthor": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-21T15:06:20.000+0000", "updated": "2013-05-21T15:06:20.000+0000" }, { "id": "260929", "author": { "name": "tinkertank", "key": "tinkertank", "displayName": "Tijs Zwinkels", "active": true, "timeZone": "Europe/London" }, "body": "I just submitted a [pull request|https://github.com/appcelerator/titanium_mobile/pull/4437] that resolves this issue for me.\r\n[[TC-2577]] is an related issue as it causes a crash on the same source line, and is resolved by the same patch.", "updateAuthor": { "name": "tinkertank", "key": "tinkertank", "displayName": "Tijs Zwinkels", "active": true, "timeZone": "Europe/London" }, "created": "2013-07-07T11:00:06.000+0000", "updated": "2013-07-07T11:00:06.000+0000" }, { "id": "261670", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "You need to set the targetSDK to 11+ in the manifest to enable ActionBar. Please see http://docs.appcelerator.com/titanium/latest/#!/guide/Android_Action_Bar for more info. Though we should be performing null checks and warn users when ActionBar is not available. ", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-12T20:16:36.000+0000", "updated": "2013-07-12T20:16:36.000+0000" }, { "id": "261680", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/4453", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-12T21:09:55.000+0000", "updated": "2013-07-12T21:09:55.000+0000" }, { "id": "261896", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4453", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T22:25:45.000+0000", "updated": "2013-07-15T22:25:45.000+0000" }, { "id": "276051", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed.\n\nTiSDK 3.2.0.v20131018154951\nCLI 3.2.0\nTitanium Studio 3.2.0.201310181940\n\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-21T23:14:31.000+0000", "updated": "2013-10-21T23:14:31.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }