Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Days = math.random (1,5)
- local widget = require( "widget" )
- local scrollContentsGroup - display.newGroup()
- scrollView = widget.newScrollView
- {
- left = 10,
- top = 10,
- width = 300,
- height = 300,
- bottomPadding = 120,
- topPadding = 0,
- id = "onBottom",
- hideBackground = false,
- backgroundColor = { 0, 0, 0, 64},
- horizontalScrollDisabled = true,
- verticalScrollDisabled = false,
- listener = scrollListener,
- --isBouncedEnabled = false,
- }
- end
- --Create a text object for the scrollViews title
- local txt_days = display.newText( "Days " .. Days , 0, 0, native.systemFont, 40)
- txt_days:setTextColor(225, 225, 225)
- txt_days.x = display.contentCenterX
- txt_days.y = 30
- scrollContentsGroup:insert( txt_days )
- place_content = place_content + (txt_days.y + txt_days.height )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement