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
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Problem in screen transition

If the Blackberry has scrolled horizontally to a horizontal scroll position of, say 200, then you paint a Bitmap at location 0, then you won't be able to see the first 200 pixels of the image.  To see the image, you have to paint it at 200.

 

Make sense?

 

Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Problem in screen transition

I have never done factoring. I have studied about the Manager and HorizontalFieldManager.

But stil i am not getting.

There is a method in Manager class called getHorizontalScroll() that Returns current horizontal offset of scrolling region.Do i have to use it?

 

 

 

  
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Problem in screen transition

Like many words, factor has a number of different meanings.  But its usual meaning, and what Google says when I ask it explain the meaning of 'factor' is

"A circumstance, fact, or influence that contributes to a result or outcome."

 

In this context I meant "the horizontal scroll position is something to include in your calculations".  And I suggested how you should include the horizontal scroll in your calculations, in my previous post.

 

Hope this is clear now.

Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Problem in screen transition

Sir it means, the special Bitmap that i added in paint method is drawn on current horizontalscroll position??

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Problem in screen transition

Yes - and I wanted you to figure this out yourself by reading the documentation and thinking about it, which is why I did not tell you immediately. 

Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Problem in screen transition

Sir i have added the current scrolling position in the x and y coordinate of paint method.

But i ma gettin the image only on the 1st background image.

If i am giving the current scrolling position in paint method then it must draw the bitmap on all the background image??

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Problem in screen transition

Can you debug and tell us what position you are painting the foreground Bitmap when you are scrolled

a) The first background image?

b) The second background image?

c) The third background image?

Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Problem in screen transition

Hey

I have given getHorizontalScroll() in x and y coordinates.

x and y will give the current horizontal scrolling position.

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Problem in screen transition

Horizontal scroll is only sideways - i.e. changes to the x coordinate.  Vertical scroll is changes in the y direction. 

Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Problem in screen transition

Ok

So it means i have to just set the current horizontalposition in the x coordinate and set the y coordinate as 0.