I used a scrollView widget and i put inside it some menu items ( buttons ).
In the simulator everything look ok, but on the devices ( tested iPhone 4S and android 2.3 tablet ),
it show 2 diagonal lines on the scrollview widget.
The lines are “transparent”, so you can see the background color.
Somebody know where is the problem ?
[lua]local widget = require “widget”
local scrollView;
local DeltaX = (display.contentWidth - 640 ) / 2
local DeltaY = (display.contentHeight - 960) / 2;
local TMPmenuItem;
local function scrollViewListener( event )
local s = event.target – reference to scrollView object
end
local function drawScrollView( totalMenuItems )
TMPmenuItem = display.newImage(“menuItem.png”, 18+DeltaX, DeltaY);
TMPmenuItem.alpha = 0.0;
– Create a new ScrollView widget:
scrollView = widget.newScrollView{
width = 4+(TMPmenuItem.width),
height = 4+(TMPmenuItem.height * 6),
scrollWidth = TMPmenuItem.width,
scrollHeight = TMPmenuItem.height * totalMenuItems,
maskFile=“scrollViewMask.png”,
listener = scrollViewListener
}
TMPmenuItem:removeSelf( );
scrollView.x = 18+DeltaX;
scrollView.y = 333+DeltaY;
end
drawScrollView(5);
TMPmenuItem = display.newImage(“menuItem.png”, DeltaX, DeltaY);
scrollView:insert( TMPmenuItem )
TMPmenuItem = display.newImage(“menuItem.png”, DeltaX, ( TMPmenuItem.height*1 )+DeltaY )
scrollView:insert( TMPmenuItem )
TMPmenuItem = display.newImage(“menuItem.png”, DeltaX, ( TMPmenuItem.height*2)+DeltaY )
scrollView:insert( TMPmenuItem )
TMPmenuItem = display.newImage(“menuItem.png”, DeltaX, ( TMPmenuItem.height*3 )+DeltaY )
scrollView:insert( TMPmenuItem )
TMPmenuItem = display.newImage(“menuItem.png”, DeltaX, ( TMPmenuItem.height*4 )+DeltaY )
scrollView:insert( TMPmenuItem ) [/lua] [import]uid: 138364 topic_id: 34894 reply_id: 334894[/import]