Text field right alignment

Hi,

We are using text fields in a business app having the text right aligned.

The problem comes out with space bar. We believe that adding a blank in a text field should actually add space to the right so the user realises he entered a blank character. But this is not the way the native text field object behaves at the moment.

I would like to request this feature to be added or if that is already possible please let me know how to do it.

Ofc I could manually move the text field changing the x position, but I aim for something more “clean”.

Thanks!

What happens when you put in a 2nd space?  What about another character?

What version of Corona SDK are you using and what device are you testing this on?

Thanks

Rob

Hi,

We’ve tested ipad2 and iphone5s with ios7

Also an iphone 4 ios6 in which this issue does appear

I am not sure about the version of Corona. How can I check that with the enterprise?

It’s an outdated version, before graphics 2.0

Thanks

2nd space does not make a difference, other characters work fine

Devices:

ipad2 and iphone5s ios7

iphone4 ios6 does not have this issue.

How can I find out which is my version of Corona Enterprise?

Thanks

You probably could print the value of system.getInfo(“build”) to get the version.  

Let me re-ask the question.  You type in “Fred”, then add a space, and nothing happens.  If you add another space, does it move and add a single space or nothing?  If you keep typing and now type in “Flintstone” do you get “Fred  Flintstone” (2 spaces), “Fred Flintstone” (1 space), “FredFlintstone” or “Fred”?

Rob

I’m not on Enterprise but this is probably consistent. Just run any app in simulator and click Corona Simulator / About … The window that opens tell you the build you’re running. Looks like this for me : Version 2014.2135 (2014.1.14)

Corona build is 2013.1244

If I type “Fred” add one space and then “Flintstone” I get “Fred Flintstone”

If I type “Fred” add two spaces and then “Flintstone” I get “Fred  Flintstone”

The only problem is that before entering “Flintstone” no space is visible

Thanks!

I checked with Engineering and they did a native text test directly in XCode and Apple does not add the spaces until there is a non space character added.  This is expected behavior.

Rob

This is interesting. I checked out out a few native IOS apps and I find that the space character is added as soon as it is typed. Example, IOS mail app, create a new message and type a Subject line.

Is the native behavior described above only applicable when the field is right aligned? Because on a regular left aligned field the “native” behavior is certainly not to hide the space character until the next non-space character is typed. 

@ksan Yes it’s only when is right aligned.

@Rob, Ok seems there isn’t much to do then. Let’s hope apple changes that because we really dislike this behaviour.

Thanks.

Ok. I really had to see this with my own eyes. I kept looking for a native app with a right aligned field and could find none. Then I thought ok lets see how right to left languages work. I read or speak none but I switched my iPhone to Arabic and then Hebrew. I went back to IOS Mail and created a new mail and typed something in the Subject line which was now right aligned. I see space characters as soon as I enter them. So far I have not been able to verify the behavior described in the original post as native behavior. Can anyone think of a right aligned field in a native app which we can try in English? 

What happens when you put in a 2nd space?  What about another character?

What version of Corona SDK are you using and what device are you testing this on?

Thanks

Rob

Hi,

We’ve tested ipad2 and iphone5s with ios7

Also an iphone 4 ios6 in which this issue does appear

I am not sure about the version of Corona. How can I check that with the enterprise?

It’s an outdated version, before graphics 2.0

Thanks

2nd space does not make a difference, other characters work fine

Devices:

ipad2 and iphone5s ios7

iphone4 ios6 does not have this issue.

How can I find out which is my version of Corona Enterprise?

Thanks

You probably could print the value of system.getInfo(“build”) to get the version.  

Let me re-ask the question.  You type in “Fred”, then add a space, and nothing happens.  If you add another space, does it move and add a single space or nothing?  If you keep typing and now type in “Flintstone” do you get “Fred  Flintstone” (2 spaces), “Fred Flintstone” (1 space), “FredFlintstone” or “Fred”?

Rob

I’m not on Enterprise but this is probably consistent. Just run any app in simulator and click Corona Simulator / About … The window that opens tell you the build you’re running. Looks like this for me : Version 2014.2135 (2014.1.14)

Corona build is 2013.1244

If I type “Fred” add one space and then “Flintstone” I get “Fred Flintstone”

If I type “Fred” add two spaces and then “Flintstone” I get “Fred  Flintstone”

The only problem is that before entering “Flintstone” no space is visible

Thanks!

I checked with Engineering and they did a native text test directly in XCode and Apple does not add the spaces until there is a non space character added.  This is expected behavior.

Rob

This is interesting. I checked out out a few native IOS apps and I find that the space character is added as soon as it is typed. Example, IOS mail app, create a new message and type a Subject line.

Is the native behavior described above only applicable when the field is right aligned? Because on a regular left aligned field the “native” behavior is certainly not to hide the space character until the next non-space character is typed. 

@ksan Yes it’s only when is right aligned.

@Rob, Ok seems there isn’t much to do then. Let’s hope apple changes that because we really dislike this behaviour.

Thanks.