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
Trusted Contributor
user17
Posts: 145
Registered: ‎01-23-2012
My Device: 9300

Screen Value

Hi All,

 

             I am implementing lazy loading. In that if i scroll screen vertically, in that stoped  position value i need to  access and i need to download the images for that. how to find the current scrolled details(i mean stoped position).

 

 

 

 

 

 

Thanks

 

       

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Screen Value

i guess
http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/ui/ScrollView.html#getVertical...
?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Trusted Contributor
user17
Posts: 145
Registered: ‎01-23-2012
My Device: 9300

Re: Screen Value

Hi simon_hain,

 

          Thank you for quick reply. Actually i want to implement lazy loading. for eg: in a row i need to display image and their details. i have somany rows is their, so first i need to display the data after that i need to display the image. so if i scroll in vertically the screen data will be display but how to get that details for download the image for that perticular datas. Is their any method to access these details in blackberry?

 

Thanks

 

 

 

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Screen Value

how do you display your data?
i would suggest to use a listfield. you can fill it with your data objects, then download the pictures and refresh the listfield after it was downloaded.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Trusted Contributor
user17
Posts: 145
Registered: ‎01-23-2012
My Device: 9300

Re: Screen Value

Hi Simon_hain,

 

            Thanks for your response, I need to add all the data but i don't want to download all the images at time. After scrolling which position i stoped in that image i need to display according to that perticular data. iam using labelfield only.

 

 

 

 

Thanks

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Screen Value

you can use getSelectedIndex on a listfield.

if you are set on labelfields you should check them with an index and see if they are visible.
you could store the last visible field from your initial processing and check until you find the first invisible field after a scroll action.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Trusted Contributor
user17
Posts: 145
Registered: ‎01-23-2012
My Device: 9300

Re: Screen Value

Hi simon_hain,

 

             Thanks for your response, but i need to load the image with out selecting any data.

 

 

 

Thanks

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Screen Value

if a screen is scrolled it usually means the user has focused another field (or swiped down on a touch display).
you can check the (now) visible fields and start loading the associated pictures.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Trusted Contributor
user17
Posts: 145
Registered: ‎01-23-2012
My Device: 9300

Re: Screen Value

Hi Simon_hain,

                         Thanks for your response, I will try what you explaind.