Corona SDK滚动视图:双滚动视图结构,具有链接内容。

我需要做一个像这样的 scrollview 結構:

enter image description here

我需要一个主要的 scrollview(A),它只能在垂直方向滚动,并且一个关联的 scrollview(B),它可以水平滚动。

黄色区域中的内容应在我滚动 A scrollview 时垂直移动,在滚动 B one 时水平移动。

我试图这样做:

    local scrollView = widget.newScrollView
    {
        top = display.contentHeight*0.08,
        left = 0,
        width = display.contentWidth,
        height = display.contentHeight*0.85,
        scrollWidth = scrollWidthGlobal,
        scrollHeight = scrollHeightGlobal,
        hideBackground = true,
        listener = scrollListener,
        topPadding = -25,
        bottomPadding = 0,
        horizontalScrollDisabled = true
    }

----- 其他内容 ------

local OscrollView = widget.newScrollView
        {
            top = 0,
            left = L6X,
            width = display.contentWidth-L6X,
            height = display.contentHeight*0.925,
            -- scrollWidth = display.contentWidth,
            -- scrollHeight = display.contentHeight*0.85,
            hideBackground = true,
            listener = scrollListener2,
            leftPadding = 0,
            rightPadding = 0,
            horizontalScrollDisabled = false,
            verticalScrollDisabled = true
        }

local try1 = display.newText("X")
try1.x, try1.y = positionX,positionY

scrollView: 插入(其他内容)
scrollView: 插入(try1)

OscrollView: 插入(try1)

如果像这样离开,则 try1 对象仅与第二个 scrollview(在水平方向上)滚动。 如果我不在两个 scrollview 中插入对象,则按正常方式插入,它不会滚动到未插入它的页面。

我也尝试将第二个 scrollview 插入第一个 scrollview 中,但没有效果。

有人能帮我吗? 使用 Corona 可以创建这样的结构吗?

对不起,我的英语不好,希望您能帮助我。 Roberto

点赞