Input fields are displayed in all screens

I have a form main.lua, when I open the login form 2 (profil.lua), but the input field and remain as to leave them only in the 1 tab?

Can you tell us more about the structure of your code.  Are you using something like Composer to manage scenes?  How are you going from one tab to the other?

Rob

I do not use any additional software. Only notepad ++ and a simulator. I want to say one more thing that fields appear only on your android device, no simulator fields.

local numericField = native.newTextField( \_W/2, 150, 220, 36 ) numericField.inputtype = "defualt" numericField.text = editText

local storyboard = require(“storyboard”)

– load profile screen

storyboard.gotoScene( “profile” )

and profile.lua:

local \_W = display.contentWidth local \_H = display.contentHeight local widget = require( "widget" ); local background = display.newImage("bg.jpg", display.contentCenterX, display.contentCenterY ) local textObject = display.newText("Поздравляем!!!", 150, 268, native.systemFontBold, 24 ) textObject:setFillColor( 1,1,1 )

Okay, you are using “storyboard”.  “composer” is the newer version of that library.  Any thing created with the word “native” in front if it, i.e. native.newTextField(), those objects sit on top of everything else.  But like display objects, they can be inserted into the scene’s view group like you do your display.* items to allow storyboard to manage them. 

So you have a choice:

1.  group:insert(yourTextObject)  – assuming “group” is your scene’s group and let storyboard manage them.

2.  manage them yourselfs.  That is you have to create and remove them in your storyboard’s enterScene() and leaveScene() events.

Rob

Can you tell us more about the structure of your code.  Are you using something like Composer to manage scenes?  How are you going from one tab to the other?

Rob

I do not use any additional software. Only notepad ++ and a simulator. I want to say one more thing that fields appear only on your android device, no simulator fields.

local numericField = native.newTextField( \_W/2, 150, 220, 36 ) numericField.inputtype = "defualt" numericField.text = editText

local storyboard = require(“storyboard”)

– load profile screen

storyboard.gotoScene( “profile” )

and profile.lua:

local \_W = display.contentWidth local \_H = display.contentHeight local widget = require( "widget" ); local background = display.newImage("bg.jpg", display.contentCenterX, display.contentCenterY ) local textObject = display.newText("Поздравляем!!!", 150, 268, native.systemFontBold, 24 ) textObject:setFillColor( 1,1,1 )

Okay, you are using “storyboard”.  “composer” is the newer version of that library.  Any thing created with the word “native” in front if it, i.e. native.newTextField(), those objects sit on top of everything else.  But like display objects, they can be inserted into the scene’s view group like you do your display.* items to allow storyboard to manage them. 

So you have a choice:

1.  group:insert(yourTextObject)  – assuming “group” is your scene’s group and let storyboard manage them.

2.  manage them yourselfs.  That is you have to create and remove them in your storyboard’s enterScene() and leaveScene() events.

Rob