Skip to main content

Anybody else has problems with smooth scrolling on the BlackBerry Storm?

6 replies [Last post]
skalabic
Offline
Joined: 2009-03-03
Points: 0

Hello,

During vertical scroll of the form (that is using BoxLayout on Y-axis) on BlackBerry Storm (touch screen device), it seem to work very strange and jump from one position to another randomly, definitely not looking 'smooth'.

There is something wrong with event handling and I have some solution that seems to work just fine.

First, when user touches the screen event processing reaches pointerDragged() method in the Component class and it forwards it to its parent in this part of code:

public void pointerDragged(int x, int y) {
if (isScrollable() && isSmoothScrolling()) {
………………
} else {
//try to find a scrollable element until you reach the Form
Component parent = getParent();
if (!(parent instanceof Form)) {
parent.pointerDragged(x, y);
}
}

But when pointer-released event arrives, similar behavior is missing in the pointerReleaseImpl() method. Strange scrolling behavior looks fixed by adding something like this in it:

private void pointerReleaseImpl(int x, int y) {
if (dragActivated) {
……………...
else
{
//try to find a scrollable element until you reach the Form
Component parent = getParent();
if (!(parent instanceof Form)) {
parent.pointerReleased( x, y);
}
}

Comments on this?

Regards,
- Silvije

http://team.shoutem.com/silvije

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bjcoredev
Offline
Joined: 2008-06-13
Points: 0

Ok thanks a lot

bjcoredev
Offline
Joined: 2008-06-13
Points: 0

Hi skalabic

I 've downloaded SHOUT'EM on the BB emulator provided by the JDE 4.7.0
:very nice program and all works fine.

I 'have seen that you can take photo with SHOUT'EM and there are no problem
What is the lwuit implemention you using ?
See my posts:

http://forums.java.net/jive/thread.jspa?threadID=77534&tstart=0
http://forums.java.net/jive/thread.jspa?messageID=386646&#386646

Have you find a workaround ?
Also, running MDS-CS is not necessary to run SHOUT'EM with the emulator
Your HTTP request for retrieving Twitter time line works fine without MDS-CS
How can do that ?
I' havent got any real Blackberry device to test my program
I only use the emulator
I 'll really appreciate you help !

Thanks in advance

skalabic
Offline
Joined: 2009-03-03
Points: 0

Hello,

ShoutEm app is using BlackBerry implementation by thorsten_s.

But camera API is not used. ShoutEm starts a camera application that comes with BlackBerry device and registers to receive captured image in a special way.

vprise
Offline
Joined: 2003-11-07
Points: 0

We frequently tested on the Storm up to a month or so ago. There was a regression a short while back with smooth scrolling on all platforms so make sure its OK.
Storm scrolling doesn't happen on pointer dragged it happens on pointerHover which is a special case only for storm right now (due to its special click screen) maybe we had a regression there due to lack of QA on that device.

skalabic
Offline
Joined: 2009-03-03
Points: 0

Yes, Storm scrolling is happening on pointerHover(), but it is working by invoking pointerDragged():

public void pointerHover(int[] x, int[] y) {
draggedMotion = null;
pointerDragged(x, y);
}

And than there's a case when pointerDragged() invokes pointerDragged() on component's parent.

In current version, following pointerReleaseImp() will never invoke pointerReleaseImp() on component's parent.

- Silvije

vprise
Offline
Joined: 2003-11-07
Points: 0

This is probably a recent regression, I'll need a device and some time to work on this (neither of which I have right now). Please file an issue and if you have a direction of how to fix this I'll try to give it a go.
I made some commits in the past with fixes for the storm device, you can check the dates of those commits and try to extract a version of LWUIT that was tested with that device. Ideally if you can use that to narrow down what went wrong that would be best...