Dear Corona community,
What I’d like to do : I’d like to give my users the option to change their username, which basically requires a native.newTextField somewhere. In addition, I don’t want to show cursor and keyboard when users click on their username, but only when they press a button “change username”.
What I’ve done so far: I’ve created not only a newTextField, but also a display.newText() object at the exact same position. Both the textField and newText hold the same username as text. In the beginning, the newTextField is not visible (isVisible = false and alpha = 0), while the newText object is visible. This ensures that users see their username, but taps on it dont do anything. When users press the “change username” button, the newText disappears, the inputfield appears, keyboard shows up and sets the cursor to the end of the username. So, basically this does the job.
Problem with this solution: The y-position of the text in the newTextField is a bit below the text of the newText. So, when the switch happens, the text is not at the same y-position, but maybe 2px below. I handled that by making the text of the inputField a bit bigger and using transitions to fade out the newText and fade in the inputField. But here it comes: The moment I set
newTextField.isVisible = true
transition.to(newTextVield, {alpha = 1, time=300})
the newTextField becomes fully visible for a couple of milliseconds, before transition from alpha = 0 to alpha =1 starts. So, even though alpha = 0 and isVisible = false is set in :create-phase, setting isVisible to true before transitiononig alpha to 1 makes it appear fully visible for a second.
What I’d expect: I would have thought that setting an object to alpha = 0 and isVisible to false allows setting isVisible to true without instantly showing the object. I have to work with isVisible = false to prevent the keyboard showing up when tapping the TextField though.
Hope it gets clear where my problem is. Maybe there is an even simpler solution like “newTextField.isTappable” or something 
Thanks