someone
someone

Reputation: 207

keyboardType="number-pad" still shows decimal dot in Android

I just checked the RN docs and it seems that keyboardType="number-pad" is cross-platform now, but when I use it I still get that . in my pad

enter image description here

P.S. I know the work around it and how to use Regex, but as the doc says this feature is now available cross-platform I wonder why it doesn't work!! shouldn't we trust the doc anymore!? :|

Upvotes: 0

Views: 2017

Answers (1)

Gabe Sechan
Gabe Sechan

Reputation: 93561

In Android there is no way to control what buttons the keyboard shows. The keyboard is a separate app and has full control over its UI. The type is only a hint- it gets to define what a number-pad is. And each device can have its own separate keyboard app, so different devices may define it differently. The only way around that is to write your own entire keyboard from scratch and include it in your app. And I really do not suggest that.

Upvotes: 2

Related Questions