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

Java Development

Reply
Contributor
khalandar
Posts: 41
Registered: ‎09-27-2010
My Device: Not Specified

Image is not shown in the Menu Item.

I am trying to add one menu item in the Menu List in BlackBerry Messages application. I am using the following code to display an image beside of the String, But Image is not shown in the MenuItem.

private class SampleMenuItem extends ApplicationMenuItem {
		SampleMenuItem(int order) {
	        super(order,ImageFactory.createImage("image.png"));
		}

		public String toString() {
			return Constants.MSG_OPEN_WITH;
		}
		public Object run(Object context) {
                    .............
                }

 

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Image is not shown in the Menu Item.

is ImageFactory.createImage("image.png") actualy creating an image?

Please use plain text.
Contributor
khalandar
Posts: 41
Registered: ‎09-27-2010
My Device: Not Specified

Re: Image is not shown in the Menu Item.

Sorry for the delay, yes ImageFactory.createImage("image.png") is creating an image it is not a null value

Please use plain text.