Im displaying the images as grid,when i try to scroll on button image,scroll is not happening,scroll is happening only in the gap between images,im using widget.newButton to display the images in the array. please help me out to soive this issue
I got it myself from the corona forums,you have to mention the button widget options as onEvent rather than OnRelease and in onEvent function use scrollview:takefocus(event),moved phase should return false,write the coding for onEvent function
function onevent(event)
if event.phase == “moved” then
local dy = math.abs(event.y - event.yStart)
if dy > 10 then
gridView.scrollView:takeFocus( event )
print(“scrolling”)
return false
end
end
elseif event.phase==“ended” then
“your coding”
end
I got it myself from the corona forums,you have to mention the button widget options as onEvent rather than OnRelease and in onEvent function use scrollview:takefocus(event),moved phase should return false,write the coding for onEvent function
function onevent(event)
if event.phase == “moved” then
local dy = math.abs(event.y - event.yStart)
if dy > 10 then
gridView.scrollView:takeFocus( event )
print(“scrolling”)
return false
end
end
elseif event.phase==“ended” then
“your coding”
end