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

Native Development

Reply
Super Contributor
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.
My Carrier: TT

how to load or appear an image (.png) on the screen of Playbook.

I can use AIR sdk or Java to load image by a single line. 

 

But, I don't know how to load an .png file by Native SDK (img_load or img_load_file).

 

 

Thank you,

 

-Fight with BB10
Retired
Posts: 36
Registered: ‎10-26-2011
My Device: RIM Developer
My Carrier: Rogers

Re: how to load or appear an image (.png) on the screen of Playbook.

Have you looked at HelloWorldDisplay sample ?

 

https://github.com/blackberry/NDK-Samples/tree/master/HelloWorldDisplay

 

Background image is loaded from HelloWorld_smaller_bubble.png by bbutil_load_texture. It is then rendered as a texture on a full-screen quad.

 

Let me know if you have further questions on this.