change the size of a card when keyboard appears

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jihem
Posts: 53
Joined: Sun Jul 28, 2013 3:21 pm

change the size of a card when keyboard appears

Post by jihem » Tue Oct 29, 2013 8:52 pm

Hi,
I can detect when the keyboard is activated/deactivated. But I don't know his height... So how can I change the size of the stack? move my input fields and button to a upper position?
Thx

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: change the size of a card when keyboard appears

Post by Mark » Wed Oct 30, 2013 11:06 pm

Hi,

You can use the working screenRect to get the area that is not covered by the keyboard. The difference between the screenRect and the working screenRect gives you the height of the keyboard.

I've noticed that the keyboard can be a bit slow. You need to make sure that you check working screenRect some time after the keyboard appears or disappears. Half a second should be enough.

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

jihem
Posts: 53
Joined: Sun Jul 28, 2013 3:21 pm

Re: change the size of a card when keyboard appears

Post by jihem » Thu Oct 31, 2013 1:34 pm

Hi,
Thanks Mark. This helps.
Kind regards,
jihem

Post Reply

Return to “Android Deployment”