Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13426] Android: Menu does not work in tab window

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2013-05-09T18:08:59.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterPedro Enrique
AssigneeSunila
Created2013-04-05T23:38:01.000+0000
Updated2017-03-17T18:05:35.000+0000

Description

To reproduce:

1. Copy this code into app.js 2. Run the app 3. Click the menu button. 4. Nothing will happen
var tabGroup = Ti.UI.createTabGroup();
var tab = Ti.UI.createTab();
var win = Ti.UI.createWindow({
    backgroundColor: 'white',
    fullscreen: false,
    activity:{
        onCreateOptionsMenu: function(e){
            e.menu.add({title: 'here'});
        }
    }
});
tab.window = win;
tabGroup.addTab(tab);
tabGroup.open();
This code, outside of the tabgroup,. works as expected:
var win = Ti.UI.createWindow({
    backgroundColor: 'white',
    fullscreen: false,
    activity:{
        onCreateOptionsMenu: function(e){
            e.menu.add({title: 'here'});
        }
    }
});
win.open();

Comments

  1. Sunila 2013-05-09

    This is as designed. Please read the section 'Menus on Tab Groups' in the documentation http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Android.Menu
  2. Lee Morris 2017-03-17

    Closing ticket as invalid.

JSON Source