Mobile keyboard

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ameguira@gmail.com
Posts: 22
Joined: Mon Apr 18, 2016 4:57 pm

Mobile keyboard

Post by ameguira@gmail.com » Sun Jun 11, 2017 5:26 pm

Hi to all LC users

I want to use a numerical keyboard if the platform is "mobile"
The instruction is SetMobileKeyboardType to "numerical"
I put this command in two handlers: PreOpenStack and OpenCard. It works and now without changing NOTHING, I have the alpha keyboard again, which I do not want to have
Do you know where I should put this instruction:
- Stack
- Card
- or field

Thank you for your help

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Mobile keyboard

Post by LiveCode_Panos » Sun Jun 11, 2017 6:02 pm

Hello ameguira,

You should use the following line:

Code: Select all

mobileSetKeyboardType "numeric"
Best,
Panos
--

ameguira@gmail.com
Posts: 22
Joined: Mon Apr 18, 2016 4:57 pm

Re: Mobile keyboard

Post by ameguira@gmail.com » Mon Jun 12, 2017 9:45 am

Hello Panos

Thank you for your response
This is exactly what I have used (my post was wrong about the command but my code was right)

Regards
Albert MEGUIRA

ameguira@gmail.com
Posts: 22
Joined: Mon Apr 18, 2016 4:57 pm

Re: Mobile keyboard

Post by ameguira@gmail.com » Mon Jun 12, 2017 12:59 pm

Hi All

The solution is not to write

if the platform is "mobile"
then MobileSetKeyboard "numeric"

but

if the environment is "mobile"
then MobileSetKeyboard "numeric"

It works and don't ask me why...
Hope this will help other

Albert

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Mobile keyboard

Post by LiveCode_Panos » Mon Jun 12, 2017 7:46 pm

Hi Albert,

Oh I see. The "platform" returns the name of the operating system LiveCode is running on, so it cannot return "mobile". In this case it returns either "iPhone" or "Android".

Best,
Panos
--

Post Reply

Return to “Android Deployment”