Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Lua Corona SDK Scrollview:具有链接内容的双Scrollview结构_Lua_Widget_Scrollview_Coronasdk - Fatal编程技术网

Lua Corona SDK Scrollview:具有链接内容的双Scrollview结构

Lua Corona SDK Scrollview:具有链接内容的双Scrollview结构,lua,widget,scrollview,coronasdk,Lua,Widget,Scrollview,Coronasdk,我需要这样做scrollview的结构: local scrollView = widget.newScrollView { top = display.contentHeight* 0.08, left = 0, width = display.contentWidth, height = display.contentHeight * 0.85, scrollWidth = scrollWidt

我需要这样做scrollview的结构:

    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
    }

----- SOME CONTENT ------

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:insert( OTHERCONTENTS )
scrollView:insert( try1 )

OscrollView:insert( try1 )

我需要一个只能垂直滚动的主滚动视图(a)和一个可以水平滚动的链接滚动视图(B)

如果我滚动A滚动视图,黄色的内容应该垂直移动,而B滚动视图也应该水平移动

我试着这样做:

    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
    }

----- SOME CONTENT ------

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:insert( OTHERCONTENTS )
scrollView:insert( try1 )

OscrollView:insert( try1 )
如果我像那样离开,对象try1只会滚动第二个滚动视图(水平)。如果我不在两个scrollview中的一个中插入该对象,则正常情况下,不使用它未插入的对象进行滚动

我也尝试在第一个滚动视图中插入第二个滚动视图,但没有效果

有人能帮我吗?有可能用电晕做这样的结构吗

请原谅我英语不好, 希望你能帮助我。
Roberto

我不确定我是否完全理解,但您基本上想要两个滚动视图,一个在另一个内部?是的,或多或少像在绘图中一样。问题是,在黄色区域,我不能滚动两边的日期。我在这里有点胡乱猜测,但我认为事件被其中一个滚动视图阻止了。我的意思是,当其中一个卷轴得到一个触摸事件时,如果它们重叠,它不会传播到另一个卷轴。是的,事实是,如果每次我移动其中一个卷轴时,不传递位于两个卷轴视图之间的黄色区域中的对象,可能就没有办法了。。。但这必须适用于该区域中存在的每个对象,并且非常长(因为我有很多数据)。我的问题是,是否有可能(如果有,如何做)使它更容易。我认为这是错误的方法。您能解释一下为什么不能在两个滚动条都处于活动状态的情况下使用一个滚动视图来实现相同的效果吗?