title: Edit Text Focus Change Listener
body: <p>I have two Edit text in an item of Recycler view, I have set a focus change listener for each of edit texts. The input type of both is text. Focus change listener works well for the first Edit text, but for the second one even I click the check button(right bottom) from keyboard it does not lose focus. What could be the problem ?</p>
  
  <pre><code>holder.textView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
              @Override
              public void onFocusChange(View view, boolean b) {
                  //textView.setGravity(Gravity.LEFT);
                  if(b){
                      holder.textView.setTextColor(getResources().getColor(R.color.TabYellow));
                      discreteScrollView.scrollToPosition(infiniteAdapter.getClosestPosition(position));
                  }
                  else {
                      Toast.makeText(getActivity(),"Input loose focus",Toast.LENGTH_SHORT).show();
                      InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
                      imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
                      holder.textView.setTextColor(getResources().getColor(R.color.white));
                      //  textView.setGravity(Gravity.CENTER);
                  }
              }
          });
          holder.newToDo.setOnFocusChangeListener(new View.OnFocusChangeListener() {
              @Override
              public void onFocusChange(View view, boolean b) {
                  if(b){
                      discreteScrollView.scrollToPosition(infiniteAdapter.getClosestPosition(position));
                  }
                  else {
                      Toast.makeText(getActivity(),"Input loose focus",Toast.LENGTH_SHORT).show();
                      InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
                      imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
                  }
              }
          });`
  </code></pre>