Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15126

Android: Menus do not respond in regards to menu button being pressed

    Details

      Description

      Problem

      Under mobile SDK 3.1.2.GA, normal menus don't pop up any more when the menu button is pressed. Works fine in 3.1.1.GA. Therefore, this is a regression.

      Testcase

      Using the following code, run the app and press the menu button. With SDK 3.1.2.GA, no menu will appear. With SDK 3.1.1.GA, the menu will appear as normal.

      app.js

      var win1=Ti.UI.createWindow({ layout:'vertical', 
                                    navBarHidden:true, 
                                    exitOnClose:true,
                                    url:'win1.js' });
      win1.open();
      

      win1.js

      var win1=Ti.UI.currentWindow;
      var Label1=Ti.UI.createLabel({ text:'Push the menu button' });
      win1.add(Label1);
       
      function MenuHandler(evt)
      {
        switch (evt.source.order)
        {
          case 0 : alert('First Option');
                   break;
          case 1 : alert('Second Option');
                   break;
        }
      }
       
      function CreateMenu(evt)
      {
        var MenuItem1,MenuItem2;
        MenuItem1=evt.menu.add({title:'Option 1', icon:null, order:0, itemId:0});
        MenuItem2=evt.menu.add({title:'Option 2', icon:null, order:1, itemId:1});
        MenuItem1.addEventListener('click',MenuHandler);
        MenuItem2.addEventListener('click',MenuHandler);
      }
       
      win1.activity.onCreateOptionsMenu=CreateMenu;
      

        Attachments

          Activity

            People

            • Assignee:
              hpham Hieu Pham
              Reporter:
              bitshftr Shawn Lipscomb
              Reviewer:
              Ping Wang
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-17402
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code