Page 1 of 1

Text placement on native input controls

Posted: Sun Sep 17, 2017 12:27 am
by quailcreek
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 246 times

Re: Text placement on native input controls

Posted: Sun Sep 17, 2017 4:33 pm
by jacque
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.

Re: Text placement on native input controls

Posted: Sun Sep 17, 2017 6:51 pm
by quailcreek
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.