Text field

Hi,

I have some problems with displaying text fields. In fact, when I have only one text field and one background in my main scene, they are both displayed at the same time.

But, when I have 3 text fields, they are first displayed on a black screen and then the background appears behind about one second after…

Would you know what causes this issue and how I could fix it?

Thanks in advance for your replies

Zip up your project, share the link with us and I’m sure we can point out the issue.

Also, if you’re creating the text fields in ‘create()’ and you’re using a composer.* transition (gotoScene() options) the text  AND if you’re not managing the text fields with composer’s parent group, the fields will just show up first.

Try looking at my examples and pay particular attention to #13:

Hi @peron.pierreantonie,

That is the normal behavior of textfields. usually what i do is making them invisible and with a timer or transition fade them or just pop them to view.

regards,

Carlos.

To explain, native objects are always drawn on top of the open GL canvas so you cannot transition them with your scene like you could with standard Corona objects.  So like @carlos stated, simply delay displaying them until your scene is fully loaded.

One trick you could do is have a place holder graphic in your scene and then simply place the text box exactly on top on a short delay. This will give the illusion of text boxes fading into view.

Hi,

Thank you very much for your replies. I began to use timer but after everything worked well, I realised I wanted to hide the background, so the text fields do not appear anymore. Therefore, I do not need to use any timer or anything…

Soory for the inconvenience…

Zip up your project, share the link with us and I’m sure we can point out the issue.

Also, if you’re creating the text fields in ‘create()’ and you’re using a composer.* transition (gotoScene() options) the text  AND if you’re not managing the text fields with composer’s parent group, the fields will just show up first.

Try looking at my examples and pay particular attention to #13:

Hi @peron.pierreantonie,

That is the normal behavior of textfields. usually what i do is making them invisible and with a timer or transition fade them or just pop them to view.

regards,

Carlos.

To explain, native objects are always drawn on top of the open GL canvas so you cannot transition them with your scene like you could with standard Corona objects.  So like @carlos stated, simply delay displaying them until your scene is fully loaded.

One trick you could do is have a place holder graphic in your scene and then simply place the text box exactly on top on a short delay. This will give the illusion of text boxes fading into view.

Hi,

Thank you very much for your replies. I began to use timer but after everything worked well, I realised I wanted to hide the background, so the text fields do not appear anymore. Therefore, I do not need to use any timer or anything…

Soory for the inconvenience…