Text Input Dialog in Landscape Form

Is it possible to have text input dialog in Landscape form on android devices? I saw in a previous discussion (http://www.giderosmobile.com/forum/discussion/comment/11399) that it works if you enable auto-rotation for iPhone in the Project Properties tab but after testing on my Htc One, it did not work. Am i missing something, or is this just not implemented yet?

Yes our current problem is proper manifest parsing on export (basically it should not only be manifest parsing, but also activity and anything that is on xcode part), that could allow us both, integrate settings and install plugins automatically, something we are experimenting on, but usually other features and bugs always get in the way

There is also another issue with the dialog box: when you try to change the box' text while it is shown, the cursor jumps back to the beginning of the text, not to the end, at least on Android. This is quite annoying.

The background is, I am using an enter frame event to check the dialog box for invalid input (unwanted characters). If the user enters an invalid char, I want to remove it from the input box. This actually works, the only problem is that the cursor is set to the BEGINNING of the input text each time you are using inputTextDialog:setText().

I am still somewhat traumatized by Corona's native input which has always been quite buggy, so I am quite disappointed to see that Gidero's native input has also a couple of flaws. It's always the native input... *sigh* :-(

Hopefully this should give your code and some time to breathe and work as expected. If you want a specific resolution, then how you approach a problem is important, which can be seen by the community that can help via you sharing some code of what and how you are doing it.

@Ar2rsawseen, @Atilim maybe this is where another event like KEY_PRESSED or INPUT_CHANGED would come in handy so that each character entered can be processed.

MauMau, are you iterating thought the string? You can use the string.gsub to replace or rather remove the unwanted characters in one go.

Regarding the orientation issue: WHAT line do we have to edit exactly in the AndroidManifest.xml? And where can I find this file? I did a search in my Android SDK directory and four or five files named AndroidManifest.xml popped up -so which one is the right one?

@OZApps: no, I do not check the input once every frame, the text correction only triggers when the dialog box has changed, of course, so that's not the problem.

The problem is that the cursor is set to the beginning (LEFT side of the input text field), each time you are using inputTextdialog:setText() -just test it on an Android device (it does NOT happen on the PC).

So when the user types some text and I have to remove an invalid char and copy the corrected string back into the dialog box using :setText(), the cursor jumps right to beginning of the input text, which is extremely annoying for the user, especially because he does not know WHY this happened now.

However, you NEED to check an input text while the user is typing, not afterwards. If I would remove the invalid characters AFTER the user pressed the OK button, he would be suprised while his text suddenly changed and some characters disappeared.

@OZApps: no, I do not check the input once every frame, the text correction only triggers when the dialog box has changed, of course, so that's not the problem.

The problem is that the cursor is set to the beginning (LEFT side of the input text field), each time you are using inputTextdialog:setText() -just test it on an Android device (it does NOT happen on the PC).

The PC is not using the native controls and it is always advised to test the app on a device to know how it will work when deployed.

However, you NEED to check an input text while the user is typing, not afterwards. If I would remove the invalid characters AFTER the user pressed the OK button, he would be suprised while his text suddenly changed and some characters disappeared.

Yes, that is right and you want to change the input as it is made, which could mean capitalization, disallowing certain characters, etc. My point was either you can use the if..then commands or a single gsub on the string.

Sure, but that doesn't make any difference because you have to write the modified text back to the dialog box then using :setText() -and this causes the cursor of the dialog box to jump back all to the left on an Android device.

Here is a stripped down code to demonstrate this issue, which should allow to enter hexadecimal chars only, for example. Run it on the device and you'll see what's going on -the cursor jumps back all to the left once you enter an invalid character:

About orientation, inside AndroidManifest file in activity tag, there is a android:screenOrientation attribute, change its value to "landscape"

About text input, understand the issue, but currently I doubt that current implementation will be modified much, as in we will probably drop it completely, when native UI on ios would reach a stable version

No, on Android this setting can only be changed before building an .apk file.

But you can export your project, change this setting, then delete assets folder (which is inside assets folder) and build .apk, and you will have a Gideros Player with your changed settingshttp://docs.giderosmobile.com/deployment.html