title: Text selection depending on the phone
body: <p>In my app, I have an EditText where the user can select a part of the text. The problem is that the selection behavior is different depending on the phone : with one, the user can select normally, but with another one the user must tap on the text indicator and then tap on "Select All".</p>
  
  <p>How can I set the behavior like the first one as default ? And why the behavior is different between phones ?</p>
  
  <p>Thank you for your answers, have a nice day !</p>
  
  <p><strong>EDIT :</strong></p>
  
  <p>Now I select the word which contains the cursor with this method :</p>
  
  <pre><code>fun EditText.selectCurrentWord() {
      val textSpan = text
      val selection = selectionStart
      val pattern = Pattern.compile("\\w+")
      val matcher = pattern.matcher(textSpan)
      var start: Int
      var end: Int
  
      while (matcher.find()) {
          start = matcher.start()
          end = matcher.end()
  
          if (selection in start..end) {
              setSelection(start, end)
              break
          }
      }
  }
  </code></pre>
  
  <p>But now the problem is that cursors at the start and end of selection doesn't appear...</p>
  
  <p>The EditText is selectable and <code>isCursorVisible</code> is set to true.</p>