horizontal bounce

I added a scrollView as following:

 local sv = widget.newScrollView { left = 0, top = 0, width = display.contentWidth, height = display.contentHeight, hideBackground = true, backgroundColor = {unpack(\_G.\_\_whiteColor)}, isBounceEnabled = true, horizontalScrollDisabled = false, verticalScrollDisabled = true, }

The scrollview is in horizontal direction. I want the bouncing effect as vertical. However, it doesn’t bounce. Is the bounce setting for vertical only?

I just did a test where I have an horizontal only scrollView and when I enabled isBoundEnabled = true, it worked as expected. Changing between true and false resulted in what I expected.

Here is my constructor:

 hourlyScrollView = widget.newScrollView { width = display.actualContentWidth, height = 200, scrollWidth = display.actualContentWidth \* 2, scrollHeight = 200, hideBackground = true, isBounceEnabled = false, verticalScrollDisabled = true, listener = hourlyListener }

I tried the sample code “Widget Demo”, the “tab2.lua”, it doesn’t work for me with the same setting as yours. I am using build 2016.2900

Hi @boscotwcheung,

What do you mean by “it doesn’t work for me with the same setting as yours”? I see bouncing in both directions using the WidgetDemo project. Is your ScrollView populated with enough content (horizontally) to allow any bounce-back effect?

Best regards,

Brent

in the widget demo, I tried to scroll down and it will automatically bounce back (scroll up). However, when I tried to scroll to left, it won’t bounce back to the right. if I keep scroll or moving the content to left, the content will finally move out of the screen. Your widget demo has enough content to scroll.

Edit:

looks like the event.limitRearched is always null in the scrollview listener

I downloaded build 2016.2910. it works now. Thanks.

Hi @boscotwcheung,

Thanks for clarifying. Must have been a regression bug in 2900. Good to hear it’s fixed now.

Brent

I just did a test where I have an horizontal only scrollView and when I enabled isBoundEnabled = true, it worked as expected. Changing between true and false resulted in what I expected.

Here is my constructor:

 hourlyScrollView = widget.newScrollView { width = display.actualContentWidth, height = 200, scrollWidth = display.actualContentWidth \* 2, scrollHeight = 200, hideBackground = true, isBounceEnabled = false, verticalScrollDisabled = true, listener = hourlyListener }

I tried the sample code “Widget Demo”, the “tab2.lua”, it doesn’t work for me with the same setting as yours. I am using build 2016.2900

Hi @boscotwcheung,

What do you mean by “it doesn’t work for me with the same setting as yours”? I see bouncing in both directions using the WidgetDemo project. Is your ScrollView populated with enough content (horizontally) to allow any bounce-back effect?

Best regards,

Brent

in the widget demo, I tried to scroll down and it will automatically bounce back (scroll up). However, when I tried to scroll to left, it won’t bounce back to the right. if I keep scroll or moving the content to left, the content will finally move out of the screen. Your widget demo has enough content to scroll.

Edit:

looks like the event.limitRearched is always null in the scrollview listener

I downloaded build 2016.2910. it works now. Thanks.

Hi @boscotwcheung,

Thanks for clarifying. Must have been a regression bug in 2900. Good to hear it’s fixed now.

Brent