Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

ScrollView horizontal scrolling
Started by jason.bradley Mar 02 2013 06:47 AM

15 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

jason.bradley

[GLOBAL: userInfoPane.html]
jason.bradley
  • Observer

  • 16 posts
  • Corona SDK

My scroll view widget will not scroll all the way to the right and stay. It will show the images on the far right but will bounce back and they are hidden (off screen) once you release it.

Here is how I'm setting up my widget:

local scrollView = widget.newScrollView
                    {
                        top = display.contentHeight - 155,
                        left = 5,
                        width=display.contentWidth - 10,
                        height = 50,
                        scrollWidth = display.contentWidth + 200,
                        scrollHeight = 50,
                        verticalScrollDisabled=true,
                        isHitTestMasked = true,
                        hideBackground=true
                    }
uid: 64619 topic_id: 36534 reply_id: 336534


[TOPIC: post.html]
#2

jason.bradley

[GLOBAL: userInfoPane.html]
jason.bradley
  • Observer

  • 16 posts
  • Corona SDK

I think I found the part that is causing the issue but I'm not sure why. I am using a transition to move my images to the end of the scroll view (transition.to). If I set the x position without using the transition it works fine.

uid: 64619 topic_id: 36534 reply_id: 144836


[TOPIC: post.html]
#3

Danny

[GLOBAL: userInfoPane.html]
Danny
  • Corona Geek

  • 2,597 posts
  • Corona Staff

Hey Jason.

I would advise using the scrollVIew methods (scrollToPosition) http://docs.coronalabs.com/daily/api/type/ScrollViewWidget/scrollToPosition.html

or (scrollTo) http://docs.coronalabs.com/daily/api/type/ScrollViewWidget/scrollTo.html

To move your scrollView instead of using your own transition.to calls.
uid: 84637 topic_id: 36534 reply_id: 144963


[TOPIC: post.html]
#4

jason.bradley

[GLOBAL: userInfoPane.html]
jason.bradley
  • Observer

  • 16 posts
  • Corona SDK

I wasn't using the transition on the scrollView but the items in the scroll view. I had images transition to a position in (over) the scrollView and on completion, insert them in the scrollView. The insert in to the scrollView works correctly BUT it doesn't calculate the scroll width correctly, it appears.
uid: 64619 topic_id: 36534 reply_id: 144971


[TOPIC: post.html]
#5

Danny

[GLOBAL: userInfoPane.html]
Danny
  • Corona Geek

  • 2,597 posts
  • Corona Staff

Oh ok.

Question: Are you using daily build 1040?
uid: 84637 topic_id: 36534 reply_id: 144972


[TOPIC: post.html]
#6

jason.bradley

[GLOBAL: userInfoPane.html]
jason.bradley
  • Observer

  • 16 posts
  • Corona SDK

Sounds like it might be fixed in 1041 as that was the issue. I'll see if it resolves it and update this thread.

"21249: Widget 2.0: ScrollView: Scroll Width/Height not recalculated with added content"
uid: 64619 topic_id: 36534 reply_id: 145078


[TOPIC: post.html]
#7

Danny

[GLOBAL: userInfoPane.html]
Danny
  • Corona Geek

  • 2,597 posts
  • Corona Staff

It wasn't fixed in 1041 unfortunately Jason, it will be either the next daily build after today or the day after hopefully.
uid: 84637 topic_id: 36534 reply_id: 145080


[TOPIC: post.html]
#8

jason.bradley

[GLOBAL: userInfoPane.html]
jason.bradley
  • Observer

  • 16 posts
  • Corona SDK

No worries, thanks for the update.
uid: 64619 topic_id: 36534 reply_id: 145082


[TOPIC: post.html]
#9

jason.bradley

[GLOBAL: userInfoPane.html]
jason.bradley
  • Observer

  • 16 posts
  • Corona SDK

My scroll view widget will not scroll all the way to the right and stay. It will show the images on the far right but will bounce back and they are hidden (off screen) once you release it.

Here is how I'm setting up my widget:

local scrollView = widget.newScrollView
                    {
                        top = display.contentHeight - 155,
                        left = 5,
                        width=display.contentWidth - 10,
                        height = 50,
                        scrollWidth = display.contentWidth + 200,
                        scrollHeight = 50,
                        verticalScrollDisabled=true,
                        isHitTestMasked = true,
                        hideBackground=true
                    }
uid: 64619 topic_id: 36534 reply_id: 66534


[TOPIC: post.html]
#10

jason.bradley

[GLOBAL: userInfoPane.html]
jason.bradley
  • Observer

  • 16 posts
  • Corona SDK

I think I found the part that is causing the issue but I'm not sure why. I am using a transition to move my images to the end of the scroll view (transition.to). If I set the x position without using the transition it works fine.

uid: 64619 topic_id: 36534 reply_id: 144836


[TOPIC: post.html]
#11

Danny

[GLOBAL: userInfoPane.html]
Danny
  • Corona Geek

  • 2,597 posts
  • Corona Staff

Hey Jason.

I would advise using the scrollVIew methods (scrollToPosition) http://docs.coronalabs.com/daily/api/type/ScrollViewWidget/scrollToPosition.html

or (scrollTo) http://docs.coronalabs.com/daily/api/type/ScrollViewWidget/scrollTo.html

To move your scrollView instead of using your own transition.to calls.
uid: 84637 topic_id: 36534 reply_id: 144963


[TOPIC: post.html]
#12

jason.bradley

[GLOBAL: userInfoPane.html]
jason.bradley
  • Observer

  • 16 posts
  • Corona SDK

I wasn't using the transition on the scrollView but the items in the scroll view. I had images transition to a position in (over) the scrollView and on completion, insert them in the scrollView. The insert in to the scrollView works correctly BUT it doesn't calculate the scroll width correctly, it appears.
uid: 64619 topic_id: 36534 reply_id: 144971


[TOPIC: post.html]
#13

Danny

[GLOBAL: userInfoPane.html]
Danny
  • Corona Geek

  • 2,597 posts
  • Corona Staff

Oh ok.

Question: Are you using daily build 1040?
uid: 84637 topic_id: 36534 reply_id: 144972


[TOPIC: post.html]
#14

jason.bradley

[GLOBAL: userInfoPane.html]
jason.bradley
  • Observer

  • 16 posts
  • Corona SDK

Sounds like it might be fixed in 1041 as that was the issue. I'll see if it resolves it and update this thread.

"21249: Widget 2.0: ScrollView: Scroll Width/Height not recalculated with added content"
uid: 64619 topic_id: 36534 reply_id: 145078


[TOPIC: post.html]
#15

Danny

[GLOBAL: userInfoPane.html]
Danny
  • Corona Geek

  • 2,597 posts
  • Corona Staff

It wasn't fixed in 1041 unfortunately Jason, it will be either the next daily build after today or the day after hopefully.
uid: 84637 topic_id: 36534 reply_id: 145080


[TOPIC: post.html]
#16

jason.bradley

[GLOBAL: userInfoPane.html]
jason.bradley
  • Observer

  • 16 posts
  • Corona SDK

No worries, thanks for the update.
uid: 64619 topic_id: 36534 reply_id: 145082



[topic_controls]
[/topic_controls]