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?
Thanks.
Comments
you need to explicitly state the orientation in AndroidManifest.xml as portrait or landscape, by default it's portrait.
Likes: Seebal
https://sites.google.com/site/xraystudiogame
http://www.giderosmobile.com/labs/native-ui
Likes: vitalitymobile
http://blog.giderosmobile.com/post/53501495071/announcing-gideros-labs
...Any news on this?
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Likes: chipster123
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* :-(
Use a flag when using this function in enterFrame (which I presume you are not having in your code)
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.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
@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.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
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 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
About Native UI -will it be a premium feature only or will it become a part of the public Gideros version, too?
And that activity should look something like:
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 settings
http://docs.giderosmobile.com/deployment.html