Migrating to graphics 2.0 on one of my current apps and getting 2 really weird scrollview problems. Note that I am using graphics compatibility mode.
Problem 1:
When the scrollView is created and loaded with content, it doesn’t also start at the top of the scrollView. For example, I created a scrollView, add a bunch of content, and now it’s first appearing about 1/3 of the way scrolled down. If I drag up a bit it will then snap to the correct place at the top. Also of note is if I do a scrollTo(“top”, 0) then it actually scrolls all the content to the middle of the screen not the top, and another drag of the scrollview will fix it and spring to the correct location. Here’s the code I use to create the scrollView.
scrollView = widget.newScrollView { left = 0, top = titleText.y+titleText.height/2, width = screenWidth, height = screenHeight, id = "onBottom", friction = .942, --.962, horizontalScrollingDisabled = true, verticalScrollingDisabled = false, hideBackground = true, hideScrollBar = true, topPadding = 0, bottomPadding = 0, listener = scrollListener, } scrollView.\_view.\_isHorizontalScrollingDisabled = true scrollView:setReferencePoint( display.TopCenterReferencePoint ) scrollView.x = screenMiddleX scrollView.y = titleText.y+titleText.height/2 group:insert(scrollView)
Problem 2:
The second problem is that there is always a bunch of space at the end of a scrollView, even with bottomPadding = 0. There is usually a half a screen (240ish pixels) of empty space no matter what I make the height of my scrollView. I have a few things I want to anchor to the end of the scrollView, but no matter what I do it always scrolls past whenever I put this anchors.
Any ideas? Haven’t reported them as bugs yet because it could just be me not fully understanding some of the Graphics 2.0 changes.