Keep stack from moving when keyboard is activated

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Keep stack from moving when keyboard is activated

Post by William Jamieson » Fri Mar 04, 2016 1:24 am

Alright, so I have already heard that the stack moving when the keyboard being activated is a "feature" not a bug. But still, with that feature there is no possible way to create a functional app. That feature is as useful as writing a script that deletes a random line of script from your code for every second the user uses your app. Both cases there is no possible way of creating an app that works.

So how can one reverse the effects of this feature?

I tried
set the bottom of this stack to item 4 of the screenrect
set the bottom of this card to item 4 of the screenrect with no luck.

Any ideas?

-Will

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

Re: Keep stack from moving when keyboard is activated

Post by Simon » Fri Mar 04, 2016 2:38 am

Hey Will,
Turn off accelerateRendering just before you hit that card. That fixes it.

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

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Keep stack from moving when keyboard is activated

Post by William Jamieson » Fri Mar 04, 2016 8:57 am

Hey Simon!

Thanks for the tip. Yes, it worked perfectly well. The funny thing is that I never set the acceleratedRendering to true. It must have done it on default. And by the way you were suggesting to place it, can one choose to turn accelerated rendering on for specific cards? Is that possible because I thought it was a stack property that when started was either always true or always false.

Would love to hear from your experience on this.

-Will

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

Re: Keep stack from moving when keyboard is activated

Post by Simon » Fri Mar 04, 2016 9:20 am

Hi Will,
You can turn acceleratedRendering on and off at any time.
I am surprised that now it's on by default.

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

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Keep stack from moving when keyboard is activated

Post by William Jamieson » Thu Mar 10, 2016 5:31 am

Oh whoops I thought I already replied to this.

Yes, Simon, that was exactly it.

So now my question is, based on your previous statement, is it possible to change the accelerated rendering from Card to card?

-Will

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

Re: Keep stack from moving when keyboard is activated

Post by Simon » Thu Mar 10, 2016 5:51 am

Hi Will,
I'm going to go out on a limb here and say acceleratedRendering is a global.
From the dictionary;
Note: Set the acceleratedRendering property in a preOpenStack or preOpenCard handler - it is not persistent (not saved into the stackfile).
I think that is all you have to consider. Now that says that it is by card so once you turn it on/off it's stuck that way until the next card.

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

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Keep stack from moving when keyboard is activated

Post by William Jamieson » Sat Mar 12, 2016 11:05 pm

Wow, thanks for that advice! That changes things a lot for me now that I know that.

-Will

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Keep stack from moving when keyboard is activated

Post by FourthWorld » Sun Mar 13, 2016 1:11 am

Maybe the default should be changed? Doing what's expected should be the easier option.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Keep stack from moving when keyboard is activated

Post by William Jamieson » Sun Mar 13, 2016 10:00 pm

Yeah, accelerated rendering i thought was not on unless you said to previously, and I don't know why accelerated rendering would cause the entire stack to move up. Is that an android feature or is that a liveCode feature? Please pray to god, liveCode didn't implement that. But yeah, I could imagine that for any new person wanting to build an android app and seeing that their app becomes completely useless every time the keyboard comes up might discourage them. OR they can spend probably about 10 hours making sure everything is shifted to the bottom of the stack and re-sized properly when that happens. Unless they happen to find this thread. Making it an extremely small window of opportunity to creating an app that works for someone new. There must be something Livecode could do to stop this functionality from happening.

-Will

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

Re: Keep stack from moving when keyboard is activated

Post by jacque » Mon Mar 14, 2016 5:01 pm

You can stop it yourself easily:

Code: Select all

set the acceleratedRendering of this stack to false


Put that into a preOpenStack handler and forget about it until you need it. On cards with editable fields, set it back to true in a preOpenCard handler.

Defaulting to true is a convenience for most developers who have editable fields in their stacks. It's a toss up whether more people need it or not. Since the default used to be false and it was changed, there must have been a compelling reason to do so.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply