Hello experts,
I created a scene for overlay the code are below. my problem is when the overlay poped-up it shows under or at the back of the textfield. Yes I cant touch the textfield because its disable due to the overlay is active but the overlay seems at the back of the textfield which should be at the top or before the textfield…
can anybody know the way or idea how to resolved it? thanks…
main.lua
local selectValue
local x, y, w, h = 20, 100, 300, 20
function selectValueListener ( event )
local phase = event.phase
if ( phase == “began” ) then
native.setKeyboardFocus (nil)
local options = {
isModal = true,
effect = “fade”,
time = 100,
params = { parentBoxX = x, parentBoxY = y, parentBoxW = w, parentBoxH = h }
}
composer.showOverlay( “dialog_x”, options )
end
end
function scene:show( event )
local sceneGroup = self.view
selectValue = native.newTextField ( x, y, w, h)
selectValue.anchorX = 0
selectValue.anchorY = 0
sceneGroup:insert ( selectValue )
selectValue:addEventListener ( “userInput”, selectValueListener )
end
dialog_x.lua
function scene:create( event )
local sceneGroup = self.view
local bgX = event.params.parentBoxX
local bgY = event.params.parentBoxY
local bgW= event.params.parentBoxW
local bgH = ( event.params.parentBoxH * 3 )
local bg = display.newRect(bgX, bgY, bgW, bgH)
bg.anchorX = 0
bg.anchorY = 0
bg:setFillColor (1)
sceneGroup:insert( bg )
end


