Hello, I’m trying to create a scrollview that fits the screen completely with no black bars at the top and bottom.
I’ve tried using screenOriginY
and top = 0 - (display.actualContentHeight - display.contentHeight) / 2
but neither of them work.
I also tried both the default width = 320, height = 480
and width = aspectRatio > 1.5 and 320 or math.ceil( 480 / aspectRatio ), height = aspectRatio < 1.5 and 480 or math.ceil( 320 * aspectRatio )
configurations but the scrollview still stays within the letterbox area. The code and screenshot are below:
local view = widget.newScrollView(
{
top = display.safeScreenOriginY,
left = display.safeScreenOriginX,
width = display.safeActualContentWidth,
height = display.safeActualContentHeight,
hideScrollBar = true,
horizontalScrollDisabled = true,
backgroundColor = {1, 1, 1}
}
)