title: Dropping event due to no window focus: KeyEvent
body: <p>Please help me. I was struggling with this issue since past one day. I dont know how to resolve this.While I try to type any character in edittext,keys are typed but typing character was not set on the required field. while I try to set the character using settext() in Text change listener,it throughs stackoverflow error. 
  Note: It was happend only in 4.4 kitkat(mentioned micromax device) but while checking in nexus it was working fine)</p>
  
  <pre><code> edtPwd1 = (EditText) findViewById(R.id.edt_pwd_1);
      edtPwd2 = (EditText) findViewById(R.id.edt_pwd_2);
      edtPwd3 = (EditText) findViewById(R.id.edt_pwd_3);
      edtPwd4 = (EditText) findViewById(R.id.edt_pwd_4);
      edtPwd1.setOnTouchListener(new View.OnTouchListener() {
          @Override
          public boolean onTouch(View v, MotionEvent event) {
              edtPwd1.setFocusable(true);
              edtPwd1.setCursorVisible(true);
              return false;
          }
      });
      edtPwd2.setOnTouchListener(new View.OnTouchListener() {
          @Override
          public boolean onTouch(View v, MotionEvent event) {
              edtPwd2.setFocusable(true);
              edtPwd2.setCursorVisible(true);
              return false;
          }
      });
      edtPwd3.setOnTouchListener(new View.OnTouchListener() {
          @Override
          public boolean onTouch(View v, MotionEvent event) {
              edtPwd3.setFocusable(true);
              edtPwd3.setCursorVisible(true);
              return false;
          }
      });
      edtPwd4.setOnTouchListener(new View.OnTouchListener() {
          @Override
          public boolean onTouch(View v, MotionEvent event) {
              edtPwd4.setFocusable(true);
              edtPwd4.setCursorVisible(true);
              return false;
          }
      });
      edtPwd1.addTextChangedListener(new TextWatcher() {
          @Override
          public void beforeTextChanged(CharSequence s, int start, int count, int after) {
          }
  
          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count) {
              Log.e("sdfsadfsdfsdf------", "-------" + s);
             // edtPwd1.requestFocus();
          }
  
          @Override
          public void afterTextChanged(Editable s) {
              //edtPwd1.setText(s);
              edtPwd1.clearFocus();
              edtPwd2.requestFocus();
          }
      });
      edtPwd2.addTextChangedListener(new TextWatcher() {
          @Override
          public void beforeTextChanged(CharSequence s, int start, int count, int after) {
          }
  
          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count) {
              Log.e("efasdhfhsldf-----", "------1" + s);
              edtPwd2.requestFocus();
          }
  
          @Override
          public void afterTextChanged(Editable s) {
              //edtPwd2.setText(s);
              edtPwd2.clearFocus();
              edtPwd3.requestFocus();
          }
      });
      edtPwd3.addTextChangedListener(new TextWatcher() {
          @Override
          public void beforeTextChanged(CharSequence s, int start, int count, int after) {
          }
  
          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count) {
              Log.e("efasdhfhsldf-----", "------2" + s);
              edtPwd3.requestFocus();
          }
  
          @Override
          public void afterTextChanged(Editable s) {
              //edtPwd3.setText(s);
              edtPwd3.clearFocus();
              edtPwd4.requestFocus();
          }
      });
      edtPwd4.addTextChangedListener(new TextWatcher() {
          @Override
          public void beforeTextChanged(CharSequence s, int start, int count, int after) {
          }
  
          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count) {
              Log.e("efasdhfhsldf-----", "------4" + s);
              edtPwd4.requestFocus();
          }
  
          @Override
          public void afterTextChanged(Editable s) {
              //edtPwd4.setText(s);
              if (!edtPwd4.getText().toString().isEmpty()) {
                  edtPwd4.clearFocus();
                  edtPwd1.clearFocus();
                  edtPwd2.clearFocus();
                  edtPwd3.clearFocus();
                  edtPwd1.setFocusable(false);
                  edtPwd2.setFocusable(false);
                  edtPwd3.setFocusable(false);
                  edtPwd4.setFocusable(false);
                  edtPwd1.setFocusableInTouchMode(true);
                  edtPwd2.setFocusableInTouchMode(true);
                  edtPwd3.setFocusableInTouchMode(true);
                  edtPwd4.setFocusableInTouchMode(true);
                  edtPwd1.setCursorVisible(false);
                  InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
                  imm.hideSoftInputFromWindow(edtPwd4.getWindowToken(), 0);
              }
          }
      });
      edtPwd2.setOnFocusChangeListener(new View.OnFocusChangeListener() {
          @Override
          public void onFocusChange(View v, boolean hasFocus) {
              if (hasFocus) {
                  if (edtPwd1.getText().toString().equals("")) {
                      edtPwd2.clearFocus();
                      edtPwd1.requestFocus();
                  }
              }
          }
      });
      edtPwd3.setOnFocusChangeListener(new View.OnFocusChangeListener() {
          @Override
          public void onFocusChange(View v, boolean hasFocus) {
              if (hasFocus) {
                  if (edtPwd1.getText().toString().equals("")) {
                      edtPwd3.clearFocus();
                      edtPwd1.requestFocus();
  
                  } else if (edtPwd2.getText().toString().equals("")) {
                      edtPwd3.clearFocus();
                      edtPwd2.requestFocus();
                  }
              }
          }
      });
      edtPwd4.setOnFocusChangeListener(new View.OnFocusChangeListener() {
          @Override
          public void onFocusChange(View v, boolean hasFocus) {
              if (hasFocus) {
                  if (edtPwd1.getText().toString().equals("")) {
                      edtPwd4.clearFocus();
                      edtPwd1.requestFocus();
  
                  } else if (edtPwd2.getText().toString().equals("")) {
                      edtPwd4.clearFocus();
                      edtPwd2.requestFocus();
  
                  } else if (edtPwd3.getText().toString().equals("")) {
                      edtPwd4.clearFocus();
                      edtPwd3.requestFocus();
                  }
              }
          }
      });
  </code></pre>
  
  <p>Sorry for my poor english and thanks in advance</p>