Keyboard issues

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Opaquer
Posts: 247
Joined: Wed Aug 14, 2013 8:24 am

Keyboard issues

Post by Opaquer » Tue Feb 03, 2015 7:25 am

Hey all!

So, I've been working on an app for a little while now and am almost there (I think) with the exception of one small bug. I've got some fields towards the bottom of my card that I want users to be able to type in. Unfortunately, when they press in the app to type in the field, the keyboard pops up and hides the field, so my users don't know if there's any issues with what they're typing :P. I've looked into some other stuff and found out that the keyboard takes up 264 pixels, but I can't for the life of me figure out how to change the location of the stack - for some reason whatever I'm trying just doesn't want to work :(

Thanks in advanced!

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Keyboard issues

Post by jmburnod » Tue Feb 03, 2015 10:19 am

Hi Opaquer,
Yes, if you use the keyboard you can't verify what you type if the fld is in the area's keyboard.
When I meet this problem I use a group with a vertical native scroller
Best regards
Jean-Marc
https://alternatic.ch

Opaquer
Posts: 247
Joined: Wed Aug 14, 2013 8:24 am

Re: Keyboard issues

Post by Opaquer » Tue Feb 03, 2015 11:44 pm

Hi Jean-Marc

So there's no way to make the fields automatically move up by 264 pixels when the keyboard is opened? That's annoying and inconvinient :(. I'll keep working on it though! I just wish there was a way to automatically detect which fields needed moving and move the screen up :(

Thanks!

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Keyboard issues

Post by Simon » Wed Feb 04, 2015 1:49 am

Hi Opaquer,
There are plenty of post around here on how to do this.
"get the effective working screenRect" --figure out how high you have to move the field then move it.
If using in a field script you have to delay it a bit so that the keyboard has a chance to move all the way up.
Avoid using keyboardActivated and his brother, they both ignore a "soft" keyboard down.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Keyboard issues

Post by jmburnod » Wed Feb 04, 2015 9:53 am

Hi Opaquer,
So there's no way to make the fields automatically move up by 264 pixels when the keyboard is opened?
Yes, you can do that but I thought that you need a fld with a formattedHeight > the height of fld
Best regards
Jean-Marc
https://alternatic.ch

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Keyboard issues

Post by jacque » Wed Feb 04, 2015 10:22 pm

Didn't I read somewhere that if acceleratedRendering is set to true, the fields will move automatically when the keyboard appears? I haven't had time to test that yet.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Keyboard issues

Post by Simon » Wed Feb 04, 2015 10:28 pm

Wow Jacque is quoting ME!??? 8) I'm so cool now.
Yes, this happens on Android only, with accleratedRendering set to true the fields will move up by themselves.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Keyboard issues

Post by jacque » Wed Feb 04, 2015 10:46 pm

I didn't know who I was quoting, but you're cool anyway SImon.

Seems like this feature should be on all mobile devices. I didn't know it was Android only, that's too bad.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply