slide screen up with keyboard
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
slide screen up with keyboard
I have a card with a number of editable fields. Some of them are hidden when the keyboard comes up. The ideal solution would be to have the screen slide up so that the active field is still visible just above the keyboard, and then slide back down then the keyboard slides away, but I have no idea where to start.
Suggestions?
An alternate solution is to use the ask command, defaulting to the field's current contents, but then I'd like to be able to control the keyboard type, and I can't seem to find a way to do so with ask.
Suggestions on either would be welcome.
Suggestions?
An alternate solution is to use the ask command, defaulting to the field's current contents, but then I'd like to be able to control the keyboard type, and I can't seem to find a way to do so with ask.
Suggestions on either would be welcome.
Re: slide screen up with keyboard
Hi whiteowl,
can't you group these fields and move the group up and
down again after the user has entered text?
Best
Klaus
can't you group these fields and move the group up and
down again after the user has entered text?
Best
Klaus
Re: slide screen up with keyboard
Huh. Is it really that simple? It won't be a problem that some of the items go past the bounds of the card? Jeez, I was afraid I'd have to be facing the nightmare I struggled through with my first iOS scroller, but you make it sound quite simple.
OK, I'll play with it. Thanks.
EDIT: Yup, it really was that simple. No nightmares at all. Thanks again!
OK, I'll play with it. Thanks.
EDIT: Yup, it really was that simple. No nightmares at all. Thanks again!
Re: slide screen up with keyboard
Hi whiteowl,
well, most of the time it is that smple with LiveCode
You can catch the "keyboardDeactivated" message to move
your group back to its original location after text input!
Best from germany
Klaus
well, most of the time it is that smple with LiveCode

You can catch the "keyboardDeactivated" message to move
your group back to its original location after text input!
Best from germany
Klaus
Re: slide screen up with keyboard
If you measure the height of the keyboard you can offset your group by that amount. By using AE, you can probably add a nice slide effect. Then, on the keyboardDeactivated message, reset the the position with a nice slide effect.
-
- Posts: 135
- Joined: Thu Sep 13, 2012 10:25 pm
Re: slide screen up with keyboard
Now that there are a bazillion different screen sizes, is there a handy way to measure the keyboard height? I'd like to do the sliding effect described below, but need to know how far to slide, based on what device the app is running on. If I could measure the height of the keyboard, it would be a snap.
Any suggestions?
I'd be ever so grateful for any advice.
Peace.
Joel
Any suggestions?
I'd be ever so grateful for any advice.
Peace.
Joel
Re: slide screen up with keyboard
Hi Joel,
you can check "the effective screenrect" after the keyboard has popped up and do some calculations
From the docs about "screenrect":
...
Adding the effective adjective to either form returns the area of the screen the application has to itself.
In particular, if the keyboard is activated, it take into account if the keyboard is taking up space on the screen.
(Android and iOS only)
...
Best
Klaus
you can check "the effective screenrect" after the keyboard has popped up and do some calculations

From the docs about "screenrect":
...
Adding the effective adjective to either form returns the area of the screen the application has to itself.
In particular, if the keyboard is activated, it take into account if the keyboard is taking up space on the screen.
(Android and iOS only)
...
Best
Klaus
-
- Posts: 135
- Joined: Thu Sep 13, 2012 10:25 pm
Re: slide screen up with keyboard
Fantastic. Just what I needed. Thanks so much.
Joel
Joel