@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!!!
Hahaha yeah buddy! thanks a lot
I was really hopeful that this would be the fix… Below is the issue I am having:
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.
As the content is scrolling, it appears choppy, almost as if it’s hanging (at random times) as the content scrolls by
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).
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 ) 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.
The issues at the top and bottom when it jumps is I think what joe528 was having a problem with. This is fixed in my fix above. Just to confirm it is the same problem try this exactly:
scroll down a bit
scroll quickly so it reaches top
before it bounces back scroll down and let go. (this has to be done quickly because bounce back is quick)
now if you do this the problem is that the bounce back has not completed while you already started to scroll down again in it will jump
back to top then scroll down again from momentum.
If this is it then it’s fixed in what I posted above. Read the post on how to use it. It needs a different require set to a new variable to use it. The files have to be in a separate folder as they are in the zip.
To make sure you are using my version you can put a print on line 523 in widget_scrollview.lua. Thats just after this line:
function M.new( options )
print(“Fixed”) --put this in
Look for it in the terminal.
Now about the scroll bar. I have not seen this issue. I read about it in the forums but never encountered it. Are you by any chance dynamically inserting and removing items while scrolling? In this case the scroll bar will act strangely. Another thing I can think of is if you insert all the objects in the same position (top) and only after move them down. In this case some strangeness might also occur. After you have set all the items in the scroll view or when you reposition them inside the scroll view, if you are using my version you can call scrollView:updateScrollAreaSize(). This might help as I used it on occasion when I moved things inside the scroll view and the scroll area did not update. If you can come up with a simple project that demonstrates it I can take a look at it.
@primoz.cerar - hey buddy, i have not tried the recent version you posted, however the new tableView (scroll to top fix) broke my app… is there something that was left out?
As mentioned in PM please check the phones log for errors.
Did you use the table view from my fix before and only now it broke when I added the scrollToY fix or did you not use it before?
I know it works in iPhone as I have another app with these fixes that work on iPhone without a problem.
I don’t have one with me to test now.
Got it. Sorry about that. Made a mistake in file names.
Take the updated zip or just rename widget_tableview.lua to all lower case letters. It had an upper case V which caused the error.
Rookie mistake
lol yup that was it =P
I am going to publish my app with this fix soon.
While primoz.cerar fix is fantastic, my questions are:
(1) How am I going to maintain the “branches” of widgets, now my source code has this widget fix and also another widget fix for segmentedControl (a bug that segmentedControl is not working correctly while it’s put on a scrollView)
Is my source code going to have more and more widget patches?
(2) If I have a bug for widget, whom should I report to?
This made me laugh a bit
Well you should report to CL with the bug report tool, but you never know when the engineers will get to it.
Regarding maintaining the different versions what I do is for the widgets I need fixes for I use the github version with my fixes, for others I use the built in ones. When I see the issues have been fixed by CL I would revert back to built in version (in reality I never do this as I don’t have access to daily builds), but since there are usualy multiple bugs and only some get fixed I stick with my version and nag the CL staff to update the github repository. When it’s updated I merge the CL fixes with my own and use that.
Edit: If you have a bug that you see with my version and not the built in one then you should PM me and not file a bug report obviously. I offer no guarantees, I’m just trying to get you past the issues you are having as I have already had to deal with most of them and I felt like sharing.
The scrollView fix Rob mentioned earlier seems to be included in the latest Corona build 2189 (https://developer.coronalabs.com/release/2014/2189/):
- Widget: Fixing the scrollview jumping to 0,0 after inserting content, casenum #30775. Improving the limit calculation on scrollviews. Fixing the scrollToY method of the tableView to stop velocity before transitioning.
The second phrase “Improving the limit calculation on scrollviews” sounds like a fix for this problem…
So I tested with 2189 about this scrollView jerkiness problem…
Guess what?
It’s NOT fixed.
Only primoz.cerar’s fix is the one that really fixes this problem.
Corona, please keep going for this problem. It’s NOT fixed yet.