Do not show android virtual keyboard when clicking an input [closed]

-8

I have a website that shows up on an Android WebView. I have my own keyboard layout in HTML and CSS and I want to use just that one. So, I need that when clicking an input, this input remains in focus, but that the virtual keyboard of the cell phone does not appear . Is there any way to achieve it? Or in any case, is there any way to ALWAYS disable the virtual keyboard regardless of whether an input is pressed or not?

    
asked by Cristian 18.07.2016 в 01:59
source

2 answers

1

To be able to do this you just have to enter the android manifest and do the following:

In the part of activity name, put the following:

<activity android:name="NombreActividad"android:windowSoftInputMode="stateHidden"></activity>

And ready with this you have hidden or disabled the android virtual keyboard

    
answered by 18.07.2016 в 10:29
0

Try to force its hiding:

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);

This should hide the virtual keyboard.

    
answered by 21.07.2016 в 09:53