PDA

View Full Version : [FIXED-131] Android: Scrolling Issues



Christian Eßl
13 Jul 2010, 10:58 PM
In some of the demos the browser-implemented Scrolling feature of my Android browser seems to "overlay" the Sencha-implemented scrolling.

For instance the list demo in Kitchen Sink:
When I try to scroll down, the browser-implemented scrolling drags the page a bit up, so that on the bottom of the page a white stripe in the height of the upper navigation bar remains. The Sencha scrolling still works after that, but sticks very often, when I scroll through the list. (On the other side, the ABC..-Panel on the right side works fine.)

Is this a known issue?

Device: HTC Desire, Android 2.1

andy1927
14 Jul 2010, 7:30 AM
Same device, same problem.

In fact, scrolling on any of the demos and my own tests is basically totally unacceptable, which is a shame because I absolutely love this framework.

Other scrolling issues I have encountered:

1. Very temperamental - randomly stops responding for no reason. Usually, switching orientation resumes functionality.
2. When it does scroll, it is very choppy.
3. Responsiveness lag - despite the events demo seeming to capture events instantly, performing the same gesture (a quick flick) to scroll in an actual app most often does not respond at all.
4. Not essential, but rubber-banding does not work at all on Android.

If scrolling behaved properly, this would easily be my framework of choice. Nice work guys!

Andy

mmullany
14 Jul 2010, 12:36 PM
@andy I might be wrong but can I hazard a guess and say that you're an iPhone user? Scrolling on Android native is different from scrolling on iPhone native, and we've tried to duplicate the arguably poorer Android native experience. A flick doesn't scroll most Androids on native - you have to touch and drag to scroll (there is no momentum scrolling). There is also no spring-back on Android native.

We had discussions internally over whether we should duplicate iPhone on non-iPhone devices and decided that we would try to keep platform specifics intact wherever possible. You're free, of course, to go in and over-ride the defaults!

mmullany
14 Jul 2010, 12:42 PM
@ Christian There are a number of Android scroll bugs that are on our list for release 1.0. Thanks for the +1 though. We'll be looking at these.

andy1927
14 Jul 2010, 1:22 PM
@extmullany I have owned a HTC Desire since the day it was released! Although I develop on a Mac and my office workplace is entirely Apple based - Macs, iPhones and iPads flying about everywhere, so I've used both mobile devices quite extensively.

I totally understand what you're saying about the difference in native scrolling. It most definitely is poorer on Android, however, it IS pretty smooth and there IS momentum scrolling, via flicks/swipes. There is no native rubber-band (spring-back) altho a select few apps attempt to emulate it.

I wish I could show you the difference in scrolling. Maybe I'll video it if needed? It is unbelievably poor and no developer in their right mind would release an app on Android which scrolls like it does. If they did, it would be an instant uninstall for any user!

The main issue is probably the fact that it randomly stops scrolling at all - even with the tap-hold-move method. I've found that only switching orientation, or not touching anything for 5-6 seconds, does the app become responsive to scroll again. Again, can video if needed.

It's good to read that you say it's mostly "working as intended" because it gives me hope that you can make it better :-)

EDIT: I'll let you know what the results are like after some editing..

Andy


@andy I might be wrong but can I hazard a guess and say that you're an iPhone user? Scrolling on Android native is different from scrolling on iPhone native, and we've tried to duplicate the arguably poorer Android native experience. A flick doesn't scroll most Androids on native - you have to touch and drag to scroll (there is no momentum scrolling). There is also no spring-back on Android native.

We had discussions internally over whether we should duplicate iPhone on non-iPhone devices and decided that we would try to keep platform specifics intact wherever possible. You're free, of course, to go in and over-ride the defaults!

mmullany
15 Jul 2010, 6:23 PM
@andy Tommy's just shown me scrolling on Android 2.2 that's going into the next beta release and it's much better. I think you'll be happy. The choppiness is gone, and we've also gone ahead and enabled flick scrolling and bounceback. We need to test it on 2.1 now, and see what we can do.

andy1927
16 Jul 2010, 3:58 AM
@extmullany That sounds great. I'm running Android 2.1 if you need someone to test it :-)

RickardP
16 Jul 2010, 5:42 AM
I get the same problem on the tabs2 example on my Android 2.1 phone (HTC Desire).

But i find out that when i tab, its sometimes works but if its not works i tab back to the page that are shows but the icon changes then i go back to the tab i clicked on first time and then its works.

TommyMaintz
28 Jul 2010, 4:35 PM
We are aware of the scroller randomly stopping on some Android devices. It just stops firing touch events so we are pretty powerless. It seems to happen on devices that have a custom UI layer like on the Evo 4g (Sense UI). We are heavily invetigating how to resolve this problem for Android 2.1 on these devices. (on 2.2 it is much much better, as Michael Mullany said)

baroquedub
29 Jul 2010, 9:43 AM
Shame... I'm getting exactly the same problem on an HTC Desire, Android 2.1.

Unfortunately I just can't expect all my end users to upgrade to Froyo and any apps I develop have got to work regardless of whether someone's got Sense UI or not.

I love the idea of this framework, it could really free us from the tyranny of vendor specific SDKs but I'll have to wait until it works more elegantly regardless of phone and OS version.

TommyMaintz
2 Aug 2010, 1:35 PM
The reason that the performance significantly changed between 0.9.1 and 0.9.2 (although we didn't change much in the Scroller class itself) was that we added a lot of documentation, which increased the file size. This increased the compilation time of first time code execution, and thus the performance of the scroller. After switching out ext-touch-debug with ext-touch in the examples, everything started performing like before.

The reason Froyo didn't really suffer from this, is that they are using V8 engine, which compiles much faster, and thus the performance hit isn't that noticeable. The same applies to newer generation iPhones, which have better hardware specs and compiles faster.

We are currently investigating if the compilation time is related to the file size of the individual javascript file that the code exists in, or the total size of all the javascript on the page. If its the first, then we might have to split the framework into several files. If its the latter, then the only way to test actual performance is to use compressed and obfuscated javascript.

For now we have updated all examples to use ext-touch instead of ext-touch-debug, and we will keep you guys posted on further discoveries and developments regarding these issues. More details on the issue are below for the technically minded.

------------------

After lots of debugging, we determined that JavascriptCore (the Javascript engine used on iOS and Android 2.1) compiles functions right before they are executed for the first time (JIT). This is nothing new, and we were aware of this. What we didn't realize though, is that the compilation time is directly related to the Javascript file size. The following would happen:

User touches the screen for the first time
TouchEventManger fires touchstart event (compile)
Scroller executes onTouchStart (compile)
...etc...

On older generation iPhones and Android 2.1, this compilation time could add up to several hundreds of milliseconds. During this time, the browser wouldn't fire any touch events, and the native behavior (scrolling the whole page) would take over. Then when you start moving, the same thing happened again.

User moves finger
TouchEventManager fires touchmove (compile)
Scroller listens for touchmove and executes onTouchMove (compile)
TouchEventManager fires scroll for first time (compile)
Scroller fires onScroll (compile)
..etc.

During all this compiling, again the browser wouldn't fire any events and the native browser behavior would take over.

PTG
11 Aug 2010, 10:18 AM
I've reported my problem which is not Android related in another thread (http://www.sencha.com/forum/showthread.php?105466-DUPE-177-List-scrolling-issue-in-0.92 (http://www.sencha.com/showthread.php?105466-DUPE-177-List-scrolling-issue-in-0.92)) but it was closed.

I tried to minimify the js files as suggested and didn't notice any difference in speed apart from loading a bit faster of course.
There is definitely a drop in performance since v.92 for me.
So I did a small video to show you exactly what I'm talking about.
As I said in the other thread, I can reproduce it with the list sample from the sdk but in the video I'm not using the sample.

Video here: http://www.youtube.com/watch?v=gWS9Fi6NhSM

hardillb
11 Aug 2010, 12:46 PM
I'm finding that a List will not scroll properly unless I specifically set a height or set fullscreen to true. Is there any way to get it to scroll nicely when using dynamic layouts?

I'm seeing this on Android, iPhone and Midori with 0.93

edit: I've attached an example

Jamie Avins
12 Aug 2010, 9:03 AM
Thats not what we would call dynamic, that's no layout at all. When that is the case, you need to set a height.

toe
15 Sep 2010, 7:04 AM
Hey guys,
I wanted to see if this has been addressed. I am finding that I too have scrolling issues using my HTC. I have an HTC incredible and when I test it the scrolling locks up everything when I flick quickly twice. I have tested it on a Motorola and an LG and this does not happen at all on those. There must be something to do with the HTC.

This happens with all of examples.

I am not sure what can be done since all of these devices are so different. It seems like another browser war. At least for me.

Thanks,
-toe

mherger
19 Sep 2010, 9:58 PM
Unfortunately I can confirm that the Kitchen Sink's List demo is broken on my HTC Desire (Android 2.2). As toe says it would lock up after a flick or two.

TommyMaintz
25 Oct 2010, 1:11 PM
For the RC1 we have rewritten the scroller. The API has almost entirely been preserved. The performance of scrolling has been greatly improved on both Android and iOS due to these changes. Unfortunately the scroller still hangs (although a lot less often) sometimes on Android. I am marking this thread as fixed for now since we won't be making any more changes to the scroller until after 1.0 (except for bug fixes of course)

mherger
25 Oct 2010, 1:50 PM
I'm looking forward to testing it!... today? tomorrow? :-)

mherger
28 Oct 2010, 8:05 AM
I just saw there's a 0.98 beta available. Is this the same code as RC1 re. this issue?

mherger
31 Oct 2010, 10:07 PM
Is there some way to re-open a bug? Scrolling Ext.List is pretty much broken for me on HTC Desire. When it does scroll, then indeed it's faster than before. And the IndexBar is working as advertised. But I can lock eg. the Kitchen Sink up within a second, just scrolling the List demo :-(

mherger
9 Nov 2010, 2:26 AM
For the RC1 we have rewritten the scroller. The API has almost entirely been preserved. The performance of scrolling has been greatly improved on both Android and iOS due to these changes. Unfortunately the scroller still hangs (although a lot less often) sometimes on Android.

Tommy - I'm sorry to say, but even with RC1 lists are useless on the HTC Desire. I can break the Kitchen Sink in a fraction of a second, right from the first screen :-(. They lock up as soon as I try to flick.

Does this really work for you? Is this a limitation of my phone?

mherger
9 Nov 2010, 2:37 AM
I just realised that I can "unlock" the device by tilting it. The resize handler or something similar seems to heal it. And even more interesting: once I've "unlocked" it this way, it seems to be much more stable than before.

Eg. if I browse to Kitchen Sink/UI/List and immediately do a flick, it would lock up. Rotate the device, and it would sometimes temporarily lock up, but never really freeze the app any more. If I do the first flick in the main menu, then unlock and go UI/List, I can hardly lock the app any more.

Does the resizing some magic which should already be done during initialization?

milo08
11 Nov 2010, 12:41 AM
Hello,

i have the same Problem on Android 2.2 and the HTC Desire in RC1 .

In my own App I scroll in the List first of all normaly and it works. But if I don`t wait of the scroll animation and I scroll again, the app freeze often.

The same in the kitchen sink demo, on the simple, grouped or disclouser List examples.

I can reproduce it in the touch events demo, but is harder to reproduce it, often in the EventLog are tapcancel or dragend at least in the log.

The scroller in beta 0.97 works best for me until now on Android.

greetz milo

Jacky Nguyen
11 Nov 2010, 5:12 PM
The HTC Desire has always been the most web-app-unfriendly Android device we've ever tested on, all due to the HTC Sense layer that prevent JavaScript on any web page to capture touch events properly. However it is still our priority to improve the Scroller further on such devices post-1.0

mherger
11 Nov 2010, 11:27 PM
The HTC Desire has always been the most web-app-unfriendly Android device we've ever tested on, all due to the HTC Sense layer that prevent JavaScript on any web page to capture touch events properly. However it is still our priority to improve the Scroller further on such devices post-1.0

Ugh... and I opted for the Desire as they didn't have the Samsung Galaxy when I rushed out to get some device to test with... Would the Galaxy (or the Galaxy Tab) be a more reliable option?

Good to hear you're still improving this. Thanks for your effort!

asinc
6 Jan 2011, 4:05 PM
This issue still exists and is a HUGE problem for the use of Sencha on apps that will target Android devices. What can be done - has anyone found a workaround?

mherger
9 Jan 2011, 10:33 PM
Hmm.... I must admit I haven't seen any lockup in quite some time. asinc - you might want to post more information like exact Sencha version, your device details etc.

asinc
10 Jan 2011, 4:52 AM
Thanks for the reply mberger - so it looks like at least on your Desire 2.2 it is ok now. I'm just trying to run the most recent kitchen sink of Sencha as the test - navigation is not bad but scrolling starts/stops/locks and is very unresponsive at best. I am testing with an HTC Magic with 2.1 currently - perhaps it is a device issue so I'll track down another device to try.

Are there others testing with 2.1 and/or older versions with success? The request by our business is to support 1.6 and up with whatever we choose.

Thanks

asinc
10 Jan 2011, 10:32 AM
As a follow on to this I just tested the Kitchen Sink demo at:
http://dev.sencha.com/deploy/touch/examples/kitchensink/

This time I used a brand new HTC Desire HD w Android 2.2, navigated to the List demo and scroll up and down quickly a couple times to see how smooth it is - on about the third up and down it freezes and becomes unresponsive. Tried this on WiFi and 3G and same result.

sammefford
21 Feb 2011, 11:05 AM
I'm encountering the same issue on HTC G2 (Android 2.2). The issue exists on Wifi and 3G. I go to Kitchen Sink, click User Interface->List, then scroll up and down a few times, then it locks. After about 5-20 seconds it unlocks, and I can scroll again. Obviously, this fundamental scrolling lagginess is unacceptable.

We're in the process of removing Sencha from our application as much as possible because of scroll and animation lagginess on both Android and iPhone. Things work great in desktop Chrome & Safari as well as iOS Simulator, but on actual phone hardware there's too much lag to be usable. We would purchase premium Sencha support if we thought it would help, but with such fundamental issues in a "stable" release, it's hard to have confidence. Plus, despite the $400/hr price for premium support, it looks like their terms make no satisfaction guarantees or bug fix guarantees. Hoping JQuery Mobile will launch soon with less issues!

boblebel
25 Feb 2011, 7:13 AM
I Launched my app yesterday, and the 1st feedback I get is a user complaining that the scrolling lock up on his Desire.

Hope this is resolved soon...

Jacky Nguyen
25 Feb 2011, 4:13 PM
We're still working on this, will update this thread when the workaround is applied to a release.

dachr
1 Mar 2011, 5:26 AM
Any estimate on how long it will take to fix? :)

sapond
1 Mar 2011, 2:14 PM
I am also experience vertical scroll issues on the HTC Evo4G. The application occasionally locks up. Also, the overflow content is sometimes not rendered.

iamcam
1 Mar 2011, 3:31 PM
Welcome to the joys of Android.

magbyr
27 Mar 2011, 10:53 AM
We recently upgraded to 1.1, and are still having problems with scrolling on Android. On HTC Desire and Desire HD the scrolling seems to occasionally lock up the application. Need to do an orientation change to unlock it.

We've almost finished our application, but can't release it until this issue is fixed. Is there any way to disable the javascript scrolling and go back to default android scrolling?

mvoss
28 Mar 2011, 11:24 AM
Hi,

I have the same problem on a HTC Incredible S, which is a fairly new and powerful HTC phone and runs Android 2.3. I can lock up the kitchen sink demo everytime within seconds. The kitchen sink demo i guess runs the newest version of Sencha touch 1.1!? I think the problem might be related to the momentum scrolling. Maybe one could add a option to turn off the momentum scrolling? Any easy way to test this?

Regards,
Markus

nedosa
28 Mar 2011, 2:58 PM
Same issue when running my first Sencha Touch app - the list example bundled with PhoneGap built on Sencha Touch 1.1 on a HTC Desire. Re-orientating the device doesn't resolve the hanged app.
Regards,
A.

nedosa
28 Mar 2011, 3:31 PM
Out of curiosity, is anyone else experiencing problems with list scrolling in the Android emulator ? It's slow with even a moderate list size (<100 items) with occasional lock-ups and superfluous item selections.

Regards,
A.

mherger
28 Mar 2011, 8:43 PM
Markus - check the documentation for Ext.util.Scroller - http://dev.sencha.com/deploy/touch/docs/?class=Ext.util.Scroller. It has some parameters to change momentum behaviour.

mherger
28 Mar 2011, 8:45 PM
The emulator is always slow. It doesn't compare even with a slow, real phone.

mvoss
29 Mar 2011, 8:15 AM
Thenk you for your response mherger. I´ll try this out tomorrow and report back my findings. Hopefully turning of or reducing momentum scrolling will improve performance on android devices.

Regards,
Markus

mvoss
30 Mar 2011, 8:03 AM
Hi again mherger,

I have been playing around with my list but I can't seem to configure the scroller to be used in the list. How do I do this? I am trying to use the scroll config option of the list with a scroller configuration as the documentation tells me to, but this doesn't work. Any ideas? Here is my code:

var personerList = new Ext.List({
fullscreen: true,
itemTpl : '{fullName}',
grouped : true,
indexBar: true,
store: personerStore,
scroll: {
momentum: false
}
});

What am I doing wrong here? Any help would be greatly apreciated.

Regards,
Markus

mvoss
2 Apr 2011, 3:32 AM
Hi,

I have done some more research on this. On our Samsung galaxy tab, and Google Nexus S the scrolling works just fine! On all our HTC phones (legend, Desire, Incredible S) it freezes everytime. All of these are running on Android 2.2 (Except for the Nexus S which is on 2.3) So this seems to be a HTC problem. Earlier in this thread there is a lot of talk of this being a problem with the HTC Sense UI laying on top of Android and not properly sending touch events to the javascript.

However if you go to Touch events and drag your finger around in the console in the kitchen sink demo the touch events seem to work fine. So this seems to related to the scroller!? Do you have any plans on improving the scroller performance of lists on android devices? This has to work for us to use Sencha touch.

Regards,
Markus

nedosa
2 Apr 2011, 11:54 AM
Just to add that Markus' and earlier comments are consistent with our experience. In the Nexus S-Android 2.3, there are no application freezing issues, albeit slow performance with 1000+ list items. Performance is markedly better using the ux.BufferedList.

Many thanks,
A.

Bucs
26 Apr 2011, 6:23 PM
+1 This is a MAJOR issue that has been going on for almost a year, and is still an issue. The list is growing of phones that we have to tell our clients that we can't support...and it's starting to get unmanageable. What is the real problem with the HTC phones as I have seen conflicting accounts...is it the Momentum Scrolling issue or is it the Sense UI conflicting with JS/Touch Events, or both?

mherger
26 Apr 2011, 8:34 PM
While I thought we had somehow worked around this issue (I haven't seen it any more in a long time), we're getting more and more complaints from our customers. Some even using the same device I am. More than a third of our customer base are using an HTC device!

realjax
27 Apr 2011, 4:59 AM
+1 This needs to be reopened.
I wrapped the geotweets sample in phonegap and installed it the other day on an HTC Wildfire,an HTC Desire and an HTC Desire HD. All were running Android 2.2.x.
Results:
- The wildfire stopped responding completely when trying to scroll the tweet list. I had to restart(!) the phone.
- The Desire stopped abruptly after the first flick of the list. I had to stop the app.
- Only the Desire HD was able to scroll, though be it far from smooth.

dachr
7 May 2011, 1:52 AM
The problem is still around on our sencha-based web-apps aswell.
Last two phones we tested on were the Desire HD and Incredible S, and both of them still were having the same issue with freezing up when trying to scroll through a list.

mvoss
24 May 2011, 9:21 AM
Hi,

we have recently updated two of our HTC phones (Incredible S and Desire HD) to the newest Android version (2.3.3). This seems to fix the scrolling issues. Is anyone else experiencing the same behaviour?

Regards,
Markus

realjax
24 May 2011, 11:57 AM
Have HTC desire HD running on 2.3.3

No improvements. In fact, seems slower on scrolling now and new bugs introduced.

psenough
5 Jul 2011, 2:42 PM
+1 requesting to re-open and fix this issue.

mathiasvalentin
12 Jul 2011, 12:06 AM
+1 requesting to re-open and fix the problem.
This issue has forced me to use jQurey Mobile instead of Sencha Touch.

nikolawannabe
18 Jul 2011, 11:18 AM
It's nearly a year later - have any workarounds or fixes been discovered or implemented? I see a similar thread (http://bugs.dojotoolkit.org/ticket/12979)on the Dojo tools bug tracker about scrolling on HTC Android devices.

Jacky Nguyen
18 Jul 2011, 4:33 PM
Just to clarify again this is not our framework problem, but it's a general Android WebView component issue and it gets worse with HTC Sense UI. We have implemented a useable workaround for this but the change can only be available in the next major release (Touch 2.0) since it requires a major architecture change to achieve.

nikolawannabe
18 Jul 2011, 4:39 PM
Thanks for the update. We will update our documentation that this is a known issue as well, and update to 2.0 when it comes out.

mvoss
18 Jul 2011, 10:30 PM
Than you for the update Jacky. Do you have a timeframe for when Sencha Touch 2.0 will be released?

Regards,
Markus

edspencer
19 Jul 2011, 11:46 PM
We try to avoid giving out timeframes, but we're not terribly far away - think late summer

mvoss
20 Jul 2011, 10:00 PM
looking forward to get my hands on the Sencha Touch 20 :)

Markus

ytilibom
23 Sep 2011, 10:26 AM
Can you confirm that the Android scrolling issues (locking up the web app, etc.) have been addressed in 2.0?

Is there a beta-version of 2.0 that can be downloaded?

edspencer
23 Sep 2011, 12:13 PM
Can you confirm that the Android scrolling issues (locking up the web app, etc.) have been addressed in 2.0?

Is there a beta-version of 2.0 that can be downloaded?

Beta is so close you can almost feel it, we'll make sure everyone knows the instant we put it live :) 2.0 does address a large range of Android issues but there are some edge cases that require a patch in the browser itself. The situation is very much improved in the new framework though

ytilibom
26 Sep 2011, 5:22 PM
Great to hear. Can you explain what you mean by patch? How would an end user apply the patch?

Is a certain webkit version required?

Do all Android OS versions have issues? Please list the known ones that still have issues.

edspencer
26 Sep 2011, 6:07 PM
All of the Android devices we've encountered so far have this issue. Some of it is just CSS implementation issues that we have no control over, other issues come from Android's limitation to 15ms processing in event-fired callbacks. If you take more than that or if other system processes slow your JS process down it does annoying things like reverting to the browser native scrolling. These things are hard to fix without fixes to the browser itself...

redmagic
7 Feb 2012, 8:36 AM
Hi,

Is there a way to throttle/discard some of the touch events in order to migitate this issue? May there's a listener I can override for android and throttle that one?

Thanks,

Arjen

WallTearer
9 Feb 2012, 6:38 AM
I'm using sencha touch v.1.1.1 and also having problems with scrolling on Android devices.
Is there any reason to mark bug as fixed under "Sencha Touch 1.x: Bugs" section if it's still not fixed?