[TIMOB-6439] Android: Menu: Rhino/v8: Adding onCreateOptionsMenu after window creation does not work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-04T10:51:48.000+0000 |
Affected Version/s | Release 1.8.0.1 |
Fix Version/s | Sprint 2011-48, Release 1.8.0.1 |
Components | Android |
Labels | branch-v8, module_android, qe-testadded |
Reporter | Allen Yeung |
Assignee | Allen Yeung |
Created | 2011-12-02T14:52:55.000+0000 |
Updated | 2014-06-19T12:43:54.000+0000 |
Description
Steps to reproduce:
1. Launch the app.js specified
2. Click on menu
Expected Result:
Menu appears with an "Add Task" option. (should say 'works' when invoked)
Actual Result:
Menu does not appear
var win = Ti.UI.createWindow({
backgroundColor: '#fff',
navBarHidden: false,
});
win.addEventListener('open', function(e) {
win.activity.onCreateOptionsMenu = function(e) {
var menu = e.menu;
var menuItem = menu.add({ title: "Add Task" });
menuItem.setIcon("KS_nav_ui.png");
menuItem.addEventListener("click", function(e) {
alert('works');
});
};
});
win.open();
Bug fixed. Verfied on: SDK: 1.8.0.1.v20111205011857 Studio: 1.0.7.201112041107 OS: OS X Lion Devices: all supported Android devices
Added label qe-testadded.