Decimal keyboard for Android?

Hi guys,

I was searching for a way to display a decimal keyboard on android and ios, but the docs state that it’s not supported for android. Is there any work around? I tried using the dial keyboard but there is no decimal point in there :confused:

Kind regards,

Bram

You can create your own (using Corona)! :slight_smile: And it will work the same on both iOS and Android.

Hi Jerejigga,

that’d be a last resort. Are you sure there is no way of making it work with the native keyboard?

The decimal keyboard for Android is not supported. It does not work across all versions of Android and all devices. If I remember correctly LG is one of the device families that it doesn’t work on. Your best bet if you need a decimal point is to use the phone keyboard.

Also look at our Corona Calculator sample: It has a custom built keyboard:

https://github.com/coronalabs-samples/Corona-Calculator

Rob

Thanks for the tips, I decided to just use the regular keyboard for now and update the keyboard with an update.

I’ve got one more question:

I want to check if the input from the textfield are numbers only, I tried using this code:

 if(addScreen.nameTxtField.text:match("%D")) then else --Proceed end

But it’s not working. Any thoughts?

You can create your own (using Corona)! :slight_smile: And it will work the same on both iOS and Android.

Hi Jerejigga,

that’d be a last resort. Are you sure there is no way of making it work with the native keyboard?

The decimal keyboard for Android is not supported. It does not work across all versions of Android and all devices. If I remember correctly LG is one of the device families that it doesn’t work on. Your best bet if you need a decimal point is to use the phone keyboard.

Also look at our Corona Calculator sample: It has a custom built keyboard:

https://github.com/coronalabs-samples/Corona-Calculator

Rob

Thanks for the tips, I decided to just use the regular keyboard for now and update the keyboard with an update.

I’ve got one more question:

I want to check if the input from the textfield are numbers only, I tried using this code:

 if(addScreen.nameTxtField.text:match("%D")) then else --Proceed end

But it’s not working. Any thoughts?