I just tried the Tab Bar application shown on Corona Open Project Window and added a button and a couple of textfields. However, the textfield and textbox stay on the screen when changing between the tabs. I did exactly same way as the button so no reason these one dont work. I am using build 2016.2830. Thanks
----------------------------------------------------------------------------------------- -- -- view1.lua -- ----------------------------------------------------------------------------------------- local composer = require( "composer" ) local widget = require( "widget" ) local scene = composer.newScene() local \_W = display.contentWidth local \_H = display.contentHeight function scene:create( event ) local sceneGroup = self.view -- Called when the scene's view does not exist. -- -- INSERT code here to initialize the scene -- e.g. add display objects to 'sceneGroup', add touch listeners, etc. -- create a white background to fill screen local bg = display.newRect( 0, 0, \_W, \_H ) bg.anchorX = 0 bg.anchorY = 0 bg:setFillColor( 1 ) -- white --Mobile Number local function onMobile( event ) -- Hide keyboard when the user clicks "Return" in this field if ( "submitted" == event.phase ) then native.setKeyboardFocus( nil ) end end mobileField = native.newTextField( \_W/2.5, \_H/10, \_W/1.4, \_H/10 ) mobileField.font = native.newFont( native.systemFontBold, \_H/20 ) mobileField:setTextColor( 0.4, 0.4, 0.8 ) mobileField.placeholder = "09123456789" mobileField:addEventListener( "userInput", onMobile ) -- Message Body local function bodyListener( event ) if event.phase == "began" then -- user begins editing textBox print( event.text ) elseif event.phase == "ended" then -- do something with textBox text print( event.target.text ) elseif event.phase == "editing" then print( event.newCharacters ) print( event.oldText ) print( event.startPosition ) print( event.text ) end end local messageBox = native.newTextBox( \_W/2.2, \_H/2.2, \_W/1.2, \_H/2 ) messageBox.placeholder = "This is line 1.\nAnd this is line2" messageBox.font = native.newFont( native.systemFontBold, \_H/25 ) messageBox.isEditable = true messageBox:addEventListener( "userInput", bodyListener ) -- Send Button -- Function to handle button events local function handleButtonEvent( event ) if ( "ended" == event.phase ) then print( "Button was pressed and released" ) end end -- Create the widget local button1 = widget.newButton( { label = "button", labelColor = { default={ 0, 0, 0 }, over={ 1, 1, 1, 0.5 } }, fontSize=\_H/15, onEvent = handleButtonEvent, emboss = false, -- Properties for a rounded rectangle button shape = "roundedRect", width = \_W/1.05, height = \_H/10, cornerRadius = 5, fillColor = { default={0,1,0,1}, over={1,0.1,0.7,0.4} }, strokeColor = { default={0,0.4,0,1}, over={0.8,0.8,1,1} }, strokeWidth = 4 } ) -- Center the button button1.x = \_W/2 button1.y = \_H/1.2 -- Change the button's label text button1:setLabel( "SEND" ) -- all objects must be added to group (e.g. self.view) sceneGroup:insert( bg ) sceneGroup:insert( mobileField ) sceneGroup:insert( messageBox ) sceneGroup:insert( button1 ) end function scene:show( event ) local sceneGroup = self.view local phase = event.phase if phase == "will" then -- Called when the scene is still off screen and is about to move on screen elseif phase == "did" then -- Called when the scene is now on screen -- -- INSERT code here to make the scene come alive -- e.g. start timers, begin animation, play audio, etc. end end function scene:hide( event ) local sceneGroup = self.view local phase = event.phase if event.phase == "will" then -- Called when the scene is on screen and is about to move off screen -- -- INSERT code here to pause the scene -- e.g. stop timers, stop animation, unload sounds, etc.) elseif phase == "did" then -- Called when the scene is now off screen end end function scene:destroy( event ) local sceneGroup = self.view -- Called prior to the removal of scene's "view" (sceneGroup) -- -- INSERT code here to cleanup the scene -- e.g. remove display objects, remove touch listeners, save state, etc. end --------------------------------------------------------------------------------- -- Listener setup scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene ) ----------------------------------------------------------------------------------------- return scene