title: How to override text of edit text when maxLength of edittext is 1
body: <p>For example: I enter 1 in edittext then again if i type 2 in same  edittext then not want to remove manualy 1 but want to override it directly from 1 to 2.</p>
  
  <p>For Example: </p>
  
  <pre><code>    editTextOtpFirst.addTextChangedListener(this);
      editTextOtpSecond.addTextChangedListener(this);
  
        @Override
  public void beforeTextChanged(CharSequence s, int start, int count, int after) {
  
  }
  
  @Override
  public void onTextChanged(CharSequence s, int start, int before, int count) {
  
  }
  
  @Override
  public void afterTextChanged(Editable s) {
  
  
      if (editTextOtpFirst.getText().length() ==1 &amp;&amp; !checkEditTextEmpty(editTextOtpFirst)) {
  
          editTextOtpSecond.requestFocus();
      }
      if (editTextOtpSecond.getText().length() ==1 &amp;&amp; !checkEditTextEmpty(editTextOtpFirst) ) {
          editTextOtpThird.requestFocus();
      }
  
  }
  
  
  
  
   @Override
    public boolean onKey(View v, int keyCode, KeyEvent event) {
      if (v.getId() == R.id.editTextOtpThird) {
          if (event.getAction() == KeyEvent.ACTION_UP) {
              if (keyCode == KeyEvent.KEYCODE_DEL) {
  
                  editTextOtpSecond.requestFocus();
                  return true;
              }
          }
      }
      if (v.getId() == R.id.editTextOtpFourth) {
          if (event.getAction() == KeyEvent.ACTION_UP) {
              if (keyCode == KeyEvent.KEYCODE_DEL) {
                  editTextOtpThird.requestFocus();
                  return true;
              }
          }
      }
      if (v.getId() == R.id.editTextOtpSecond) {
          if (event.getAction() == KeyEvent.ACTION_UP) {
              if (keyCode == KeyEvent.KEYCODE_DEL) {
  
                  editTextOtpFirst.requestFocus();
                  return true;
              }
          }
      }
  </code></pre>
  
  <p>Now when i enter value  "1" in edit text-1 then cursor move to the next edit text-2 but i want to change value of edit text-1 from "1" to "4" but need to remove manually "1" and then need to enter another value..but i do not want this...i want to direct override from "1" to "4" when i type another value in edit text.</p>