title: setOnFocusChangeListener not working when add TextView programmatically
body: <p>I can't set <code>setOnFocusChangeListener</code> or even <code>setOnClickListener</code> when I try to add a textview programmatically. </p>
  
  <p>I tried</p>
  
  <pre><code>txt1.requestFocus();
  txt1.setFocusable(true);
  txt1.setFocusableInTouchMode(true);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>txt1.setClickable(true);
  </code></pre>
  
  <p><code>setOnTouchListener</code> is working but the other listeners doesn't.
  This my code:</p>
  
  <pre><code>text_b.setOnClickListener(new View.OnClickListener() 
  {
      @Override
      public void onClick(View view) 
      {
          try 
          {
              TextView txt1 = new TextView(DashActivity.this);
  
              txt1.setText("This is me");
              txt1.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
              txt1.setTextColor(Color.parseColor("#FAC421"));
              txt1.requestFocus();
              txt1.setFocusable(true);
              txt1.setFocusableInTouchMode(true);
              txt1.setOnClickListener(new View.OnClickListener() 
              {
                  @Override
                  public void onClick(View view) 
                  {
                      try 
                      {
                          Log.i("txt: ", "Clicked");
                      } 
                      catch (NullPointerException e) 
                      {
                          e.printStackTrace();
                      }
                  }
              });
  
              txt1.setOnFocusChangeListener(new View.OnFocusChangeListener() 
              {
                  @Override
                  public void onFocusChange(View v, boolean hasFocus) 
                  {
                      Log.i("txt:" , "Changed");
  
                      if(hasFocus)
                      {
                          v.setBackgroundResource(R.drawable.text_border);
                      }
                      else
                      {
                          v.setBackgroundResource(0);
                      }
                  }
              });
  
              txt1.setOnTouchListener(new View.OnTouchListener() 
              {
                  @Override
                  public boolean onTouch(View v, MotionEvent event) 
                  {
                      if (event.getAction() == MotionEvent.ACTION_MOVE) 
                      {
                              // Offsets are for centering the TextView on the touch location
                          v.setX(event.getRawX());
                          v.setY(event.getRawY());
                      }
  
                      return true;
                  }
              });
  
              mRrootLayout.addView(txt1);
          } 
          catch (NullPointerException e) 
          {
              e.printStackTrace();
          }
      }
  });
  </code></pre>
  
  <p>Any solution?</p>