I'm using an Xamarin.Forms.Entry control to capture input of a barcode which almost always starts from numbers but can contain text. I want to use standard android keyboard (Android.Text.InputTypes.ClassText) but I'd like to start the keyboard on the numbers tab (see picture). Is it possible to get this behaviour?
Asked
Active
Viewed 593 times
1 Answers
1
Based on my test, we could not show that keyboard.
If you want to show the Numeric kayboard, you could set in xml or do the custom renderer.
xml:
<Entry Keyboard="Numeric"></Entry>
Custom renderer:
var native = Control as EditText;
native.InputType = Android.Text.InputTypes.ClassNumber | Android.Text.InputTypes.NumberFlagSigned | Android.Text.InputTypes.NumberFlagDecimal | InputTypes.ClassText;
Or create you own keyboard. It is complex. You could follow the steps in the link. https://medium.com/swlh/how-to-create-a-custom-keyboard-with-xamarin-forms-android-4fa3b83dad1d
I do that, it works well. You could download the source file from the link below. https://github.com/FabriBertani/CustomKeyboardXamarinForms

Wendy Zang - MSFT
- 10,509
- 1
- 7
- 17