title: android how to set the EditText Cursor to the end of its text
body: <p>The user has to enter his mobile number, the mobile number has to be 10 numbers, I used <code>TextWatcher</code> to do that, like this</p>
  
  <pre><code>et_mobile.addTextChangedListener(new TextWatcher() {
  
      @Override
      public void onTextChanged(CharSequence s, int start, int before,
              int count) {
          // TODO Auto-generated method stub
  
      }
  
      @Override
      public void beforeTextChanged(CharSequence s, int start, int count,
              int after) {
          // TODO Auto-generated method stub
  
      }
  
      @Override
      public void afterTextChanged(Editable s) {
          // TODO Auto-generated method stub
          if (et_mobile.getText().toString().length() &gt; 10) {
              et_mobile.setText(et_mobile.getText().toString()
                      .subSequence(0, 10));
              tv_mobileError.setText("Just 10 Number");
          }else{
              tv_mobileError.setText("*");
          }
      }
  });
  </code></pre>
  
  <p>but the problem is when the user enters the 11th number, the cursor of the edittext starts from the beginning of the text, I want it to still at the end, how?</p>