title: SelectAll on EditText with Two-Way Data Binding
body: <p>I have an Activity with a fragment... In this fragment I'm using two-way DataBinging in an EditText. This EditText is binded to a Double property of the object, and because of this, I had to implement an InverseMethod to convert String -> Double and Double -> String...</p>
  
  <p>In my EditText I configured <strong>android:selectAllOnFocus="true"</strong>, and I'm forcing it also on  onCreateView method of the fragment: <strong>edQtd.selectAll()</strong></p>
  
  <p>The problem is, that when the fragment appears, the EditText has the focus, but the text is not selected, instead, the cursor is before the first number...</p>
  
  <p>I wanted it to show with all the text selected...</p>
  
  <p>Tried to instead of using the inverse method, just concatenate an empty String, but the result was the same...</p>
  
  <p>From what I saw debbuging it, the binding class generated, sets the text after the fragments creation (after I manually called <strong>edQtd.selectAll()</strong>), removing the selection...</p>
  
  <p>Any ideas how to solve it?</p>
  
  <p><strong>Edit:</strong>
  For now I solved it adding a TextChangedListener to the EditText, where I select all the text only the first time the text is changed:</p>
  
  <pre><code>edQuantidade.addTextChangedListener(new TextWatcher() {
          @Override
          public void afterTextChanged(Editable s) {
              if(selectAllEdQtdText) {
                  edQuantidade.selectAll();
                  setSelectAllEdQtdText(false);
              }
          }
  
          @Override
          public void beforeTextChanged(CharSequence s, int start, int count, int after) {
  
          }
  
          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count) {
  
          }
      });
  </code></pre>