title: Android Webview Focus problem with the keyboard
body: <p>I'm trying to do the basics with the focus and the android keyboard. I have an App that has a WebView and a Button.</p>
  <p>The webview has inputs, that will have the focus, but i don't want the keyboard to appear unleash the user touches the input. That's because i'm using it on a Zebra terminal, with a scanner.</p>
  <p>I tried to do like this:</p>
  <p><em>activity_main.xml</em></p>
  <pre><code>        android:descendantFocusability=&quot;blocksDescendants&quot;
          android:focusable=&quot;false&quot;
          android:focusableInTouchMode=&quot;false&quot;
  </code></pre>
  <p><em>MainActivity.java</em></p>
  <pre><code>Button toggleKeyboard = findViewById(R.id.btnKeyboard);
          toggleKeyboard.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  if(!keyboardVisible){
                      try {
                          InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
                          imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
                          WebView myWebView2 = findViewById(R.id.webview);
                          myWebView2.setFocusableInTouchMode(true);
                          keyboardVisible = true;
                      } catch (Exception e) {
                          // TODO: handle exception
                      }
                  }else{
                      try {
                          keyboardVisible = false;
                          WebView myWebView2 = findViewById(R.id.webview);
                          myWebView2.setFocusableInTouchMode(false);
                          InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
                          imm.hideSoftInputFromWindow(view.getApplicationWindowToken(), 0);
                      } catch (Exception e) {
                          // TODO: handle exception
                      }
                  }
              }
          });
  </code></pre>
  <p>That doesn't work. I can gain the focus and not show the keyboard the first time, but then it will show the keyboard everytime i gain a focus on the webview.</p>
  <p>I think the problem is because of setFocusableInTouchMode doesn't work as supossed to.</p>
  <p>Is there a way to hide forever the keyboard when i click the button without losing the focus?</p>
  <p>Thank you!</p>