Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry® OS Smartphones

Reply
New Developer
Posts: 6
Registered: ‎09-13-2008
My Device: Not Specified

Adding menu item to file explorer

can someone please tell me how to add menu item to file explorer item.....i have used ApplicationMenuItemRepository class to add menu item in SMS , addressbooks, task and memo but it is not working with file explorer .

 

can anyone help me out in this????

 

Thanks

 

 

Forums Veteran II
Posts: 2,744
Registered: ‎04-01-2008
My Device: Bold

Re: Adding menu item to file explorer

You probably should post this in a more appropriate forum.
------------------------------
If you've found a solution through a post; please mark it as a solution.
If someone's was particularly helpful, give them kudo's!.


Get busy living, or get busy dying.

http://blog.port3101.org/hdawg/
New Developer
Posts: 8
Registered: ‎12-04-2008
My Device: Not Specified

Re: Adding menu item to file explorer

hi,

 

use this..

 

long locationToAddMenuItem = ApplicationMenuItemRepository.MENUITEM_FILE_EXPLORER_ITEM;//.MENUITEM_FILE_EXPLORER;
            ApplicationMenuItem imagemenu = new MapMenuItem();
            ApplicationMenuItemRepository amir = ApplicationMenuItemRepository.getInstance();
            ApplicationDescriptor app = ApplicationDescriptor.currentApplicationDescriptor();
            amir.addMenuItem(locationToAddMenuItem, imagemenu,app);

 

 

private static class MapMenuItem extends ApplicationMenuItem {

     MapMenuItem() {
        super(20);
     }

     public String toString() {
        return "my Menu Item";
     }

     public Object run(Object context) {
     if (context instanceof String){ 
     // do some thing

    }
          
       return null;
     }
}

Highlighted
New Developer
Posts: 7
Registered: ‎08-12-2008
My Device: Not Specified

Re: Adding menu item to file explorer

Hi,

 

I've been struggling with that functionnality... 

Did you actually got that working properly in these very circumstances (with the run() called when menuItem is clicked from the file explorer)???

 

Thanks,