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

10K Developer Commitment

Reply
Contributor
Posts: 27
Registered: ‎02-17-2013
My Device: Developer-BB10

Icon not getting displayed in simulator

I am developing an app for BB10. I've included an 80x80 png to the src folder and I've mentioned the name of the image correctly in the bar-descriptor.xml file using the code

  <icon>

     <image>Balloon.png</image>

  </icon>

 

But the icon is not getting displayed in the simulator.Have I missed something? Please help.:Helpsmilie:

Developer
Posts: 1,523
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Icon not getting displayed in simulator

Hi,

 

Make sure it's defined as an asset in bar-descriptor.xml:

 

    <asset path="icon.png">icon.png</asset>

 

Then the following should work:

 

<icon>
<image>icon.png</image>
</icon>

 

In sample projects icon.png is located in project root. If it's located elsewhere adjust the path="..." in asset tag to point to the correct folder.

 


Andrey Fidrya, @zmeyc on twitter
Contributor
Posts: 27
Registered: ‎02-17-2013
My Device: Developer-BB10

Re: Icon not getting displayed in simulator

I did as you said, but it still doesn't get displayed. :-( Thank you for replying though.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Icon not getting displayed in simulator

Check your actual .bar file to see if it's really getting packaged in there, and where. You can use any unzip program to inspect a .bar file.

Also, why are you using only 80x80? That's not the correct size, though it should just get scaled up (but will probably look bad) so it's not likely the reason this isn't working.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Contributor
Posts: 27
Registered: ‎02-17-2013
My Device: Developer-BB10

Re: Icon not getting displayed in simulator

I am not able to unzip it. It says that the file is corrupt. Instead, I just overwrote the default icon found in the sdk. Now the icon gets displayed in the simulator. But in this case, will it appear the same way in a real blackberry device too?