01-24-2013 09:20 AM
I am trying to add one menu item in the Menu List in BlackBerry. But the issue is, after clicking the menu button, my menu option is adding as the topmost menu and it is not coming in the focus. So i have scroll up and click that menu.
For this i have write this code to add the menu only to view the email:
SampleMenuItem mi = new SampleMenuItem(3);
mi.setIcon(ImageFactory.createImage("image.png"));
amir.addMenuItem(ApplicationMenuItemRepository.MEN UITEM_EMAIL_VIEW, mi);
And here is my Sample Menu item class :
private class SampleMenuItem extends ApplicationMenuItem {
SampleMenuItem(ApplicationDescriptor app) {
super(20);
}
public String toString() {
return Constants.MSG_OPEN_WITH;
}
public Object run(Object context) {
............
}
}
How can we add the menu in the middle of the menu list means change the menu position and make it focused??
01-24-2013 09:26 AM
01-24-2013 11:22 AM
But then i can i get the focus on that menu?? I mean when i will open the menu list, it should focus my added menu item only.
01-24-2013 11:52 AM
01-25-2013 12:31 AM
I am trying to put image also in MenuItem but image is not appearing.
I tryed through consturctor
super(order, ImageFactory.createImage("image.png"));
and through setIcon Method
mi.setIcon(ImageFactory.createImage("image.png"))
any solutions for this?
01-25-2013 04:16 AM
This is a different question to the one on this Thread, so please start your own Thread.
When you start you own Thread can you describe the environment you are using (JRE level, OS level on device, type of device etc) and also give us a sample of the icon that you are having problems with.