Pickerwheel Acts Oddly Inside A Scroll View

Hey,

I’ve got a business app that I’m building. As part of it, I’m displaying various text on screen followed by a selector wheel, which means that its all insider a scroll view. It appears that scrolling throws off the picker wheel’s selection, sometimes flinging the wheel to odd parts of the list.

Am I doing something wrong, or does this happen for other people as well?

Build: 2013.1076, Occurs on both Mac Simulator and a Sony Ericson X10.

[lua]local widget = require(“widget”)

    local data = {}

    data.vrms = { “ABCDEFG”, “1234567”, “WHADIS?”, “1”, “2”, “3”, “4” }

        

    screenGroup = widget.newScrollView{

        left = 0,

        top = 0,

        width = display.contentWidth,

        height = display.contentHeight,

        scrollWidth = display.contentWidth * 1,

        scrollHeight = display.contentHeight * 1.5,

        hideBackground = true,

        scrollBarColor = {189, 45, 255, 128}

    }

    

    local text = “Text\nText\nText\nText\nText\nText\nText\nText\nText\nText\nText\nText\nText\nText\nText\nText\nText\n”

    local mainText = display.newText( text, 10, 0, display.contentWidth, 0, native.systemFont, 18 )

    screenGroup:insert(mainText)

–Select VRM

    local columnData =

    {    

        {

            align = “center”,

            startIndex = 1,

            labels = data.vrms,

        }

    }

    local pickerWheel = widget.newPickerWheel

    {

        top = mainText.height,

        font = native.systemFontBold,

        columns = columnData

    }

    screenGroup:insert(pickerWheel)[/lua]

I am having the same or at least similar issue with a date pickerwheel in a table view.  It is almost impossible to select a date on the windows simulator or android device (generic at&t phone).  My testers claim the wheels are not “sticky” enough - they slide the wheel to the selection they want and then the wheel just takes off to some other value when they remove their finger.

Any ideas?

Hi @kwc_jr,

Which build of Corona are you using? There have been various updates and improvements to the widgets library in recent weeks, so I’d like to confirm you’re using a very recent build.

Thanks,

Brent Sorrentino

Brent - thanks. I am using 2013.1157. 

Cleaning up some of my code in this area I just math.floor()'d all of the positioning (top, left, setting .x after inserting, etc) and the column widths - these were all calculated but were not necessarily integers before.  Since doing that just this morning things are 100 times better (at least on windows simulator and my at&t android phone).  Not sure what this has to do with anything but thought I would pass it along.

I am having the same or at least similar issue with a date pickerwheel in a table view.  It is almost impossible to select a date on the windows simulator or android device (generic at&t phone).  My testers claim the wheels are not “sticky” enough - they slide the wheel to the selection they want and then the wheel just takes off to some other value when they remove their finger.

Any ideas?

Hi @kwc_jr,

Which build of Corona are you using? There have been various updates and improvements to the widgets library in recent weeks, so I’d like to confirm you’re using a very recent build.

Thanks,

Brent Sorrentino

Brent - thanks. I am using 2013.1157. 

Cleaning up some of my code in this area I just math.floor()'d all of the positioning (top, left, setting .x after inserting, etc) and the column widths - these were all calculated but were not necessarily integers before.  Since doing that just this morning things are 100 times better (at least on windows simulator and my at&t android phone).  Not sure what this has to do with anything but thought I would pass it along.