title: How does setTextIsSelectable prevent the keyboard from appearing?
body: <p>If I create a simple app with single Activity that contains a single EditText, and I do</p>
  
  <pre><code>EditText editText = (EditText) findViewById(R.id.editText);
  editText.setTextIsSelectable(true);
  </code></pre>
  
  <p>then this prevents the keyboard from appearing (in my tests on Android 5.0 and 7.1). This is what I want, as requested in these questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/15174606/disable-soft-keyboard-from-edittext-but-still-allow-copy-paste">Disable soft-keyboard from EditText but still allow copy/paste?</a></li>
  <li><a href="https://stackoverflow.com/questions/5851339/how-to-disable-android-soft-keyboard-for-a-particular-activity">How to disable Android Soft Keyboard for a particular activity?</a></li>
  <li><a href="https://stackoverflow.com/questions/5803193/android-disable-soft-keyboard-at-all-edittexts">Android: Disable soft keyboard at all EditTexts</a></li>
  <li><a href="https://stackoverflow.com/questions/10611833/how-to-disable-keypad-popup-when-on-edittext">How to disable keypad popup when on edittext?</a></li>
  <li><a href="https://stackoverflow.com/questions/10636635/disable-keyboard-on-edittext">Disable keyboard on EditText</a></li>
  </ul>
  
  <p>The <a href="https://github.com/android/platform_frameworks_base/blob/master/core/java/android/widget/TextView.java#L5607" rel="nofollow noreferrer">source code</a> is</p>
  
  <pre><code>public void setTextIsSelectable(boolean selectable) {
      if (!selectable &amp;&amp; mEditor == null) return; // false is default value with no edit data
  
      createEditorIfNeeded();
      if (mEditor.mTextIsSelectable == selectable) return;
  
      mEditor.mTextIsSelectable = selectable;
      setFocusableInTouchMode(selectable);
      setFocusable(selectable);
      setClickable(selectable);
      setLongClickable(selectable);
  
      // mInputType should already be EditorInfo.TYPE_NULL and mInput should be null
  
      setMovementMethod(selectable ? ArrowKeyMovementMethod.getInstance() : null);
      setText(mText, selectable ? BufferType.SPANNABLE : BufferType.NORMAL);
  
      // Called by setText above, but safer in case of future code changes
      mEditor.prepareCursorControllers();
  }
  </code></pre>
  
  <p>But I don't see what about this disables the Input Method from appearing.</p>
  
  <p>Calling the following methods all return <code>true</code> whether I set <code>setTextIsSelectable</code> or not.</p>
  
  <pre><code>editText.isFocusable();             // true
  editText.isFocusableInTouchMode();  // true
  editText.isClickable();             // true
  editText.isLongClickable();         // true
  </code></pre>
  
  <p>I'm partly asking because I'm curious, but also because I need to disable the system keyboard in my app. I want to understand what is happening so that I can be sure that it is really doing what I think it is doing.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Follow-up question and answer:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/45228531/how-to-enable-keyboard-on-touch-after-disabling-it-with-settextisselectable">How to enable keyboard on touch after disabling it with setTextIsSelectable</a></li>
  </ul>