Disable keyboard popup on app

Hello guys,
is there a way to stop the popup keyboard from showing when i start typing in a textbox in a perspective application running on an android device.

Thanks and regards,
Dominic

Why would you need to do this? The point of a text field is to input information into the text field. Are you implementing a custom keyboard?

I don't believe there is an easy way to do this. You may have luck doing some preventDefault in the focus handler of the text field. But I am not sure that will help either.

Hi Benjamin,
The textbox that I want to use is to capture a barcode using the built-in scanner on the device ; so I don't need to input any text in the field.
The popup keyboard hides the barcode text that I placed at the bottom of the screen.
The only workaround I found was to simply move the barcode text object higher up so it doesn't get overlayed.

I am not able to test on a mobile device to be sure, but you may be able to call .focus() on another element in the view in your onClick event for the textbox, but even if that worked then the text sent from the device likely wouldn't enter the textbox.

If it does work, you could call the .focus after the text has been entered to immediately dismiss the keyboard.

So then why wouldn't you just use a label component instead? You can just add an onClick and select scan barcode as the action.

Then there would be no keyboard.

Hi Benjamin,
I did actually look at that solution ; unfortunately the device is using a built-in barcode reader and not a typical camera so the onClick -> barcodeAction does not give the desired effect.
I appreciate your time...I think I will just stick with the workaround (moved the barcode object higher up so it stays visible when the keyboard pops up)

Thanks!
Dominic

2 posts were split to a new topic: Question about scanning barcodes