In G2, scrollView is not that smooth?

I will see if I can make a video.

But just try to move fast enough between ups & downs 

and when you swipes, lift your finger up right away

You should be able to see it. It’s quite obvious.

This are two separate issues.

What joe528 is experiencing is when you scroll fast and it hit’s limit then before it bounces back scroll in the other dirrection again. This will cause it to jump to the begining at the time that bounce back was supposed to complete.

This could be fixed by canceling bounce back if there was another touch.

The other issue is that you can see when momentum scrolling slows down that it’s not smooth. This is not just a scrollview issues. It’s any transition, enterFrame update (which is what momentum scrolling is) and alike. If you are doing things in enterFrame or timers that take various amount of time in each frame than you will see this.

Primoz

@primoz.cerar

In your earlier post, you said you could fix the first issue? How?

By taking the GitHub source for scrollview and fixing the bounce back to cancel on another press. But you would have to use that version in your project. You can use only one file that is the culprit which is ‘widget_momentumScrolling.lua’. And the rest would be used from the builtin version which has some bug fixes already compared to the version on GitHub. I will look into it in the event and post the fix.

Do you mean the fix is already in or you are going to look into it?

I will look into it and post the fix in the evening. (Typo in last post)

Here is what I came up with. It needs some testing to make sure everything is ok.

Just unzip with the folder in the zip in to you project dir.

Now if you want to use the scroll view or the table view with the fixes do this:

local widgetFix = require (“widgets.widget”)

local scroll = widgetFix.newScrollView(options)

same for table view.

If you need any other widgets include the default corona ones like you always do:

local widget = require (“widget”)

Included fixes:

  • scroll view will not jump back to starting position if scrolling in opposite direction before bounce back has completed (vertical and horizontal)

  • eliminated occasional error when removing objects from scroll view

  • exposed scrollView:updateScrollAreaSize() for making sure the scroll works correctly when moving objects inside the scroll view

  • fixed some issues when using multiple scroll views at the same time

  • scroll view and table view now respect the vertical scrolling threshold

  • fixed table view bug when deleting multiple rows

  • fixed table view insertRow bug that says table view is scrolling when it’s not and doesn’t allow insert

  • fixed scroll view scrolls to top when inserting objects issue (pass keepPositionOnInsert = true in newScrollView)

  • fixed tableView:scrollToY doesn’t stop scrolling

Hope this helps. Let me know if there are any issues.

Awesome, this is great work! Now, if you could sneak in preventing scrollView to shift back to top after inserting objects (http://forums.coronalabs.com/topic/41639-20132087-widgetnewscrollview-scrolls-to-top-when-inserting-new-items/#entry233284) you sir, would forever be held in my heart. lol

@eja done.

Updated file above.

use keepPositionOnInsert = true in newScrollView call

Cheers

Great news, everybody!

After I tried primoz.cerar’s fix, the not-that-smooth problem (jerkiness/choppiness) I had been whining about has GONE!

What a work, primoz.cerar!

I am speechless. 

@primoz’s command of the widgets is nothing but amazing! I have the privilege of testing something new he is creating and it continually amazes me. Thank you Primoz.

Ahhhhhhhhhhhhhh! You are unbelievable, Great job!!! @Primoz.cerar if you have more updates, please let me know!! YOU’RE THE BEST!!!

@eja Will I be forever held in your heart? :smiley:

Hahaha yeah buddy! thanks a lot

I was really hopeful that this would be the fix… Below is the issue I am having:

  1. As I am scrolling, the scroll bar stays at the top of the screen, until I get to the end of the content, then It jumps to the bottom.

  2. As the content is scrolling, it appears choppy, almost as if it’s hanging (at random times) as the content scrolls by

  3. As I get to the end of the content, the scroll bar jumps to the bottom, and as I scroll back up it looks like it starts to scroll, then starts over again (very fast).

@trent7

All the 3 issues are related to the scroll bar?

The scroll bar doesn’t really bother me, just wonder if it’s a symptom related to what’s causing the issue

@eja updated the fix per your request regarding tableView:scrollToY.

@trent7 In 2 and 3 are you talking about the content or the scroll bar?

Here is a link to a video i just did… When I first start the scroll, notice the stutter. I try this a few times, then as I start to scroll down the page, if you look to the right you’ll see the scroll bar is still in the same location. In the video, its hard to tell but scroll is choppy as it pans down the screen. Finally, once I get down to the bottom and start to scroll back up, you’ll notice where it looks like it starts to scroll up, then starts over again (very fast). It doesn’t do it every time. Just during faster swipes. 

https://www.dropbox.com/s/7j1ortmyel39ijt/scroll5.mov

I am happy to send anyone a testflight if you want to test it that way…

I experience this as well, (although it doesn’t bug me too much… pun :slight_smile: ) it would be epic if that can be fixed… but as a dev and just from seeing it, I wouldn’t even know where to begin to debug this.