Что то у меня не выходит ничего ( выскакивает текстовая клавиатура при вводе в поле input webview. Атрибут inputtype (html) с text на number поменять нельзя. Уважаемые специалисты как сделать что бы при вводе в < .input inputtype="text"> (страница загружена в webview) открывалась клавиатура с цифрами TYPE_CLASS_PHONE?
public class CustomWebView extends WebView {
public CustomWebView(Context context) {
super(context);
}
@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
InputConnection inputConnection = super.onCreateInputConnection(outAttrs);
outAttrs.inputType = InputType.TYPE_CLASS_PHONE;
return inputConnection;
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
Activity activity = new Activity();
View vwf = activity.getCurrentFocus();
InputMethodManager inputManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.restartInput(vwf);
setFocusable(true);
}
}//class