keyboard shows over text field

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dbcbos
Posts: 23
Joined: Sun Jun 24, 2012 9:49 am

keyboard shows over text field

Post by dbcbos » Sun Jun 24, 2012 10:05 am

Hello,

I'm relatively new to Livecode and new to mobile programming though not new to programming.

I've done some nice test projects like google maps, data grid, geometry, notifications etc. all work. So I thought most of the hard part of learning has been done and got on with building my actual app to put it all together, but I got an issue early on I don't know how to solve.

I made a layout which I like, but I have a problem with it:

How can I when the keyboard shows, autoscroll the app down so the field and the keyboard are visible. Atm the keyboard just moves over the field and its not visible anymore? Should be simple but don't know how.

Cheers for the assistance.

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

Re: keyboard shows over text field

Post by Mark » Sun Jun 24, 2012 10:15 am

Hi,

The dictionary of my LiveCode version says this is available for iPhone only, maybe this has changed in the latest version:

Code: Select all

on inputBeginEditing
   set the rect of the target to <some other rect>
end inputBeginEditing
If this doesn't work, maybe you can use the openField message. To reset the rect of the field, you 'll need either the closeField and exitField messages or the inputEndEditing message.

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

dbcbos
Posts: 23
Joined: Sun Jun 24, 2012 9:49 am

Re: keyboard shows over text field

Post by dbcbos » Fri Jun 29, 2012 8:24 pm

Thanks Mark.

I went with a native text field so it does it automatic now, but your solution works to. Just with a livecode text field you need to use openfield and exitfield. Only problem I had with that was if someone pulled down the keyboard it staid in that position. There probably is a workaround for that, but haven't put the time in it.

Post Reply