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,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Issues with design of table with scroll

As you have noted, the code supplied does not match your specifications in that there is no scrollChangeListener involved. 

 

But the code supplied by pp demonstrates an alternative approach.  In it, you keep tabs on the currently in focus Cell, and then set the scroll positions appropriately.  So you are actually moving the Cells rather than reacting to the user moving the cells. 

 

You say that the scroll change listener 'lags' which is the problem you have with my option (c).  Can you give us a quick summary of your test environment (OS, number of cells etc).  I will try to find out if I can get it working quicker.  As noted, it is something I have always wondered about, I might have a go to see if I can figure out what I would actually do!

Please use plain text.
Super Contributor
pp
Posts: 278
Registered: ‎11-04-2010
My Device: 4.5 and above
My Carrier: none

Re: Issues with design of table with scroll

Hi Peter,

My requirement was creating a table like view only for one row... so add all the columns to CentricHFManager, in the mainscreen.
mainscreen will handle swipe and navigation movement. So i asked him to do the same for all row.

Regards,
pp
Please use plain text.
Contributor
june_misuki
Posts: 27
Registered: ‎06-19-2012
My Device: Developer
My Carrier: None

Re: Issues with design of table with scroll

Well Peter, i have around 9 columns and around 200 rows. Iam using the Blackberry Eclipse plugin. The OS is BB6.0.

Iam not sure you got what i meant about the scroll delay. So, il explain again.

 

Its like if you set the scroll manually of the table with fixed columns the same as the scroll of table with data in the scroll change listener of table with data, then the scroll of the table with fixed columns lags the scroll of the table with data. 

 

 

Please use plain text.
Contributor
june_misuki
Posts: 27
Registered: ‎06-19-2012
My Device: Developer
My Carrier: None

Re: Issues with design of table with scroll

 

PP thanks for the code. But the Visual effect obtained by shifting positions of cells manually instead of actual scroll 

is not suitable to my requirement.

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

Re: Issues with design of table with scroll

OK, if I find time today I will have a play, and see if implemented as I would, I also see the lag.  Will let you know. 

Please use plain text.
Contributor
june_misuki
Posts: 27
Registered: ‎06-19-2012
My Device: Developer
My Carrier: None

Re: Issues with design of table with scroll

Thank you for the help Peter and pp. I found the solution. Instead of setting the scroll of the table with fixed row/col in the onScrollChange of table with data, i had to do it in the paint of the table with data. It still results in a very very small lag. But it is not visible for small movements.

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

Re: Issues with design of table with scroll

OK,

 

I am a little worried about doing this, because you are effectively updating a Ui component while updating another Ui component and the order in which things happen will be set by the framework and not by you.  So at some stage RIM might break your code by doing things in a different order.  So I suggest that you test this over the range of OS's you intend to support. 

 

In addition, I would recommend that you keep a track of the last position you set and only do the setScroll when it changes so you minimize the overhead. 

 

That said, it is an interesting idea and I applaud your efforts trying to find a solution for yourself.  Well done!

Please use plain text.