Text placement on native input controls

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Text placement on native input controls

Post by quailcreek » Sun Sep 17, 2017 12:27 am

Hi,
I reworked this stack from a LC lesson. I wanted to see if the discrepancy of the placement of text in a native control between iPhone and Android was true. I appears there is a difference. I don't think this was always true and I don't know when it started. Android places the text in the same place regardless if the control is "input" or "multiline". On the other hand, iPhone places the text in a different vertical position for "multiline" than is does for "input". The "input" text placement is different than where the text is placed on Android. It looks like the "multiline" text placement on iPhone is the same as the "multiline" and "input" on Android. Has anybody else see this and if so how are you handling it when you develop the same app for both platforms? I would rather not have to have 2 separate stacks with the rect of the controls in different locations in order to compensate.
NativeControl-2_W_Android.livecode.zip
(6.47 KiB) Downloaded 203 times
Tom
MacBook Pro OS Mojave 10.14

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7230
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Text placement on native input controls

Post by jacque » Sun Sep 17, 2017 4:33 pm

You wouldn't need two stacks, just adjust the rect of the input control based on platform in the handler that creates the native controls.

Or if it wouldn't interfere, use a multiline control everywhere.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Text placement on native input controls

Post by quailcreek » Sun Sep 17, 2017 6:51 pm

Thanks Jacqueline,
That crossed my mind I just wanted to check with the LC brain-trust. ;-)
Multiline won't work everyplace so moving the rects based upon platform seems a better choice.
Tom
MacBook Pro OS Mojave 10.14

Post Reply

Return to “Android Deployment”