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
Developer
dcharya
Posts: 74
Registered: ‎03-04-2012
My Device: developer
My Carrier: developer

native image viewer implimentation

Hey hi All

 

I am facing a problem. i need to implement a native image viewer in my application. I am developing this application for OS 5.0 and above i know picturescrollfield can provide me this functionality but my problem is i have to load images from server and to create picturescroll field it requires scrollentry which should be creatded first to set data for picture scroll field i am trying this to implement for so long but enable to achive it pls help :Helpsmilie:

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

Re: native image viewer implimentation

The usual approach in this situation is to display a placeholder entry that you replace with the real entry once it has been downloaded. 

Please use plain text.
Developer
dcharya
Posts: 74
Registered: ‎03-04-2012
My Device: developer
My Carrier: developer

Re: native image viewer implementation

Thanks Sir for quick reply but I am doing the same thing but problem  is that in case of PictureScrollField we have to define Width and Height initially and images that I am getting from server are of different sizes so if I fix Height and Width that result in distortion of images due scaling of images and it is also taking more time to download a single image unlike iPhone and android.

:Helpsmilie:

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

Re: native image viewer implementation

"in case of PictureScrollField we have to define Width and Height initially and images that I am getting from server are of different sizes"

 

Never used this Field, but the API says ti will cope:

All images are allocated the same amount of space on slider (as defined by the constructor's imageWidth and imageHeight parameters). Images can differ from that size in which case the scroll field behaves as follows:

•Images are NOT resized.
•If they are larger than the allocated drawing area they are center aligned and cropped to fit the allocated area.
•If they are smaller than the allocated drawing area they are center aligned in the allocated area.

 

The setPicture method, which is how I would expect you to update the images, doesn't say that images have to be the same size.

 

"it is also taking more time to download a single image unlike iPhone and android"

 

I'm sure there are other factors involved, but if that is what you see, then that is what you see!

 

I'm not quite sure what you are expecting here?

Please use plain text.