{ "id": "132627", "key": "TIMOB-17279", "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": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-08-18T21:55:58.000+0000", "created": "2014-07-04T09:29:08.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "actionview", "menuItem", "module_android", "qe-manualtest" ], "versions": [], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-08-18T22:23:56.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": "{code}\r\n var menu = e.menu;\r\n var rightSymbolView = Ti.UI.createView({\r\n\twidth : Ti.UI.SIZE,\r\n\theight : Ti.UI.SIZE\r\n });\r\n var rightSymbol = Alloy.createWidget(\"ti.ux.iconfont\", \"widget\", {\r\n\tright : 10,\r\n\tsize : 30,\r\n color : \"#fff\",\r\n\ticon : \"fa-gear\"\r\n });\r\n rightSymbol.setParent(rightSymbolView);\r\n var menuItem = menu.add({\r\n\titemId : 0,\r\n actionView: rightSymbolView,\r\n\tshowAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS\r\n });\r\n{code}\r\n\r\nThe above code doesn't work. The below one works as expected.\r\n{code}\r\nvar menuItem = menu.add({\r\n\titemId : 0,\r\n\tshowAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS\r\n });\r\nmenuItem.setActionView(rightSymbolView);\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: MenuItem's actionView property is not working ", "creator": { "name": "mano_mykingdom", "key": "mano_mykingdom", "displayName": "Manojkumar Murugesan", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "mano_mykingdom", "key": "mano_mykingdom", "displayName": "Manojkumar Murugesan", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Titanium SDK 3.3.0 RC\r\nAlloy 1.4 RC\r\nAndroid 4.2.2", "closedSprints": [ { "id": 154, "state": "closed", "name": "2014 Sprint 15 SDK", "startDate": "2014-07-21T21:56:31.515Z", "endDate": "2014-08-02T00:00:00.000Z", "completeDate": "2014-08-04T21:03:51.067Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "312496", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Can reproduce this problem which Titanium SDK 3.3.0 RC and 3.2.3.\r\nHere is a simpler test case I wrote:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tfullscreen: true\r\n});\r\n\r\nvar activity = win.activity;\r\n\r\nvar rightSymbolView = Ti.UI.createView({\r\n \twidth : Ti.UI.SIZE,\r\n \theight : Ti.UI.SIZE,\r\n });\r\n \r\nvar label = Ti.UI.createLabel({\r\n \ttext: \"test view\"\r\n});\r\nrightSymbolView.add(label);\r\n\r\nactivity.onCreateOptionsMenu = function(e){\r\n \tvar menu = e.menu;\r\n \tvar menuItem = menu.add({ \r\n \titemId:0,\r\n \tactionView: rightSymbolView, // property actionView doesn't work when place here\r\n \tshowAsAction: Ti.Android.SHOW_AS_ACTION_ALWAYS\r\n });\r\n //menuItem.setActionView(rightSymbolView); // add property actionView which works well\r\n};\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-07-07T06:23:13.000+0000", "updated": "2014-07-07T06:23:13.000+0000" }, { "id": "313296", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Used getOrCreateView instead of peekView so that view will be created if it is not already created.\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5900", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-07-10T18:51:20.000+0000", "updated": "2014-07-10T18:51:20.000+0000" }, { "id": "319167", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix. \r\nMenuItem's actionView property is working properly.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 3.4.0.201408051600\r\nTi SDK : 3.4.0.v20140815142514\r\nMac OSX : 10.8.5\r\nAlloy : 1.4.1\r\nCLI - 3.3.0\r\nCode Processor: 1.1.1\r\nNexus 5 - android 4.4.4", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-18T21:55:23.000+0000", "updated": "2014-08-18T21:55:23.000+0000" }, { "id": "319170", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "testadded", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-18T22:23:56.000+0000", "updated": "2014-08-18T22:23:56.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }