When I add the following to my app I get the same results (0,0,640,704) for each.
Not helpful.
How do i get the loc top of the keyboard (in 3.5, 4, and iPad sizes) so i can properly move fields out of the way of the keyboard?
on keyboardActivated
answer "keyboard activated" & cr & the effective working screenRect
end keyboardActivated
on keyboardDeactivated
answer "keyboard deactivated" & cr & the effective working screenRect
end keyboardDeactivated
effective working screenRect
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: effective working screenRect
Hi SIms,
Isn't the working screenRect updated after keyboardActivated handler finishes? Try
I wonder if "effective" is necessary. I haven't tried that.
Kind regards,
Mark
Isn't the working screenRect updated after keyboardActivated handler finishes? Try
Code: Select all
on keyboardActivated
send "keyboardActivated2" to me in 0 millisecs
end keyboardActivated
on keyboardActivated2
answer "keyboard activated" & cr & the effective working screenRect
end keyboardActivated2
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: effective working screenRect
Thank you for the reply Mark.
Using your suggestion i get the same numbers as with my previous code "0,0,640,704"
I get different numbers for different devices but none of them seem to reflect the working screenrect or the top of the keyboard.
The stack is 320 x 480 in size - it must work for 3.5, 4.0, and iPad Retina displays
The preOpenStack includes:
iphoneUseDeviceResolution true, true
set the fullscreenmode of me to "noBorder"
set the acceleratedrendering of me to true
The field in question will need a different rect/loc (i am using "set the bottom of" to reposition) for each device so i am hoping the advertised scripts will do the job.
Setting the loc of each field for each device is an option but not a very attractive on due to the amount of flds.
Have you used these handlers to reposition fields with any success?
Thank you.
sims
Using your suggestion i get the same numbers as with my previous code "0,0,640,704"
I get different numbers for different devices but none of them seem to reflect the working screenrect or the top of the keyboard.
The stack is 320 x 480 in size - it must work for 3.5, 4.0, and iPad Retina displays
The preOpenStack includes:
iphoneUseDeviceResolution true, true
set the fullscreenmode of me to "noBorder"
set the acceleratedrendering of me to true
The field in question will need a different rect/loc (i am using "set the bottom of" to reposition) for each device so i am hoping the advertised scripts will do the job.
Setting the loc of each field for each device is an option but not a very attractive on due to the amount of flds.
Have you used these handlers to reposition fields with any success?
Thank you.
sims
Re: effective working screenRect
Hi sims,
I think keyboardActivated/Deactivated is flaky, I think when you use the soft keyboard down (hide the keyboard from the keyboard keys) it does not trigger a keyboardDeactivated. At least that was my experience about a year ago, might have changed since then.
Also I believe the send should not be in 0 but more like 250 ms to allow the keyboard to finish moving into it's final position.
Simon
I think keyboardActivated/Deactivated is flaky, I think when you use the soft keyboard down (hide the keyboard from the keyboard keys) it does not trigger a keyboardDeactivated. At least that was my experience about a year ago, might have changed since then.
Also I believe the send should not be in 0 but more like 250 ms to allow the keyboard to finish moving into it's final position.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: effective working screenRect
Hi,
Simon may be hitting the nail... I remember doing something like this and maybe I used send in 250 millisecs or perhaps even more.
Best,
Mark
Simon may be hitting the nail... I remember doing something like this and maybe I used send in 250 millisecs or perhaps even more.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: effective working screenRect
Flaky it seems. Seems like such an essential thing as moving bits around can be a hack otherwise.
Add multiple devices and fullscreenmode it seems even more of a series of guesses.
Such is life.
Thanks for the replies.
sims
Add multiple devices and fullscreenmode it seems even more of a series of guesses.
Such is life.
Thanks for the replies.
sims