title: Android custom keyboard in webview
body: <p>I'm trying to implement a custom keyboard in Android. I want to input some text in my Webview. Since I don't want to display the keyboard when I hit everywhere in the Webview I was thinking of a listener of something like this: </p>
  
  <pre><code> webview.setOnTouchListener(new View.OnTouchListener() {
  
          @Override
          public boolean onTouch(View v, MotionEvent event) {
              // TODO Auto-generated method stub
  
              if (((WebView) v).getHitTestResult().getType() == EDIT_TEXT_TYPE)
                    showMyKeyboardHere();
  
              return false;
          }
      });
  </code></pre>
  
  <p>is my listener, it seems to return EDIT_TEXT_TYPE on the key press I do AFTER I've pressed the edit text field. So when I press the edit text field it returns UNKNOWN_TYPE and the click after that when pressed somewhere else returns EDIT_TEXT_TYPE. My guess would be that the OnTouchListener happens before the touch even gets sent on to the Webview it won't have registered it. Any way to change that?</p>
  
  <p>Now to my question: Since I will only want my custom keyboard in this application, is there anyway to listen to whatever event is called to bring up the normal keyboard and immediately hide it and show my own?</p>