Page 1 of 1
Keep stack from moving when keyboard is activated
Posted: Fri Mar 04, 2016 1:24 am
by William Jamieson
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
Re: Keep stack from moving when keyboard is activated
Posted: Fri Mar 04, 2016 2:38 am
by Simon
Hey Will,
Turn off accelerateRendering just before you hit that card. That fixes it.
Simon
Re: Keep stack from moving when keyboard is activated
Posted: Fri Mar 04, 2016 8:57 am
by William Jamieson
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
Re: Keep stack from moving when keyboard is activated
Posted: Fri Mar 04, 2016 9:20 am
by Simon
Hi Will,
You can turn acceleratedRendering on and off at any time.
I am surprised that now it's on by default.
Simon
Re: Keep stack from moving when keyboard is activated
Posted: Thu Mar 10, 2016 5:31 am
by William Jamieson
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
Re: Keep stack from moving when keyboard is activated
Posted: Thu Mar 10, 2016 5:51 am
by Simon
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
Re: Keep stack from moving when keyboard is activated
Posted: Sat Mar 12, 2016 11:05 pm
by William Jamieson
Wow, thanks for that advice! That changes things a lot for me now that I know that.
-Will
Re: Keep stack from moving when keyboard is activated
Posted: Sun Mar 13, 2016 1:11 am
by FourthWorld
Maybe the default should be changed? Doing what's expected should be the easier option.
Re: Keep stack from moving when keyboard is activated
Posted: Sun Mar 13, 2016 10:00 pm
by William Jamieson
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
Re: Keep stack from moving when keyboard is activated
Posted: Mon Mar 14, 2016 5:01 pm
by jacque
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.