title: onFocusChange function is not working for custom editText
body: <p>I have customised an <code>EditText</code>, now when i try to use <code>onFocusChanged()</code> function in this <code>View</code> t does not work. Why is it happening?</p>
  
  <p>Code for my customised <code>EditText</code> is:
  </p>
  
  <pre><code>&lt;EditText
      android:id="@+id/clearable_edit"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:paddingRight="35dip"
      android:singleLine="true" /&gt;
  
  &lt;Button
      android:id="@+id/clearable_button_clear"
      android:layout_width="30dip"
      android:layout_height="30dip"
      android:layout_alignParentRight="true"
      android:layout_centerInParent="true"
      android:layout_marginRight="5dip"
      android:gravity="center"
      android:text="@string/cross"
      android:textSize="12sp" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>and java is:</p>
  
  <pre><code>    public class ClearableEditText extends RelativeLayout implements
      OnFocusChangeListener {
  
  LayoutInflater inflater = null;
  EditText edit_text;
  Button btn_clear;
  
  private ClearableEditText editText;
  
  public ClearableEditText(Context context, final ClearableEditText editText) {
      super(context);
      Log.e("===============", "entered");
      this.editText = editText;
  }
  
  @Override
  public void onFocusChange(View v, boolean hasFocus) {
      // TODO Auto-generated method stub
      Log.e("===============", "done");
      Toast.makeText(getContext(), "dlknsajlkdsj", Toast.LENGTH_SHORT).show();
  }
  
  public ClearableEditText(Context context, AttributeSet attrs, int defStyle) {
      super(context, attrs, defStyle);
      if (!isInEditMode())
          initViews();
  }
  
  public ClearableEditText(Context context, AttributeSet attrs) {
      super(context, attrs);
      // TODO Auto-generated constructor stub
      if (!isInEditMode())
          initViews();
  
  }
  
  public ClearableEditText(Context context) {
      super(context);
      // TODO Auto-generated constructor stub
      if (!isInEditMode())
          initViews();
  }
  
  void initViews() {
      // TODO Auto-generated method stub
      inflater = (LayoutInflater) getContext().getSystemService(
              Context.LAYOUT_INFLATER_SERVICE);
      inflater.inflate(R.layout.clearable_edit_text, this, true);
      edit_text = (EditText) findViewById(R.id.clearable_edit);
      btn_clear = (Button) findViewById(R.id.clearable_button_clear);
      btn_clear.setVisibility(RelativeLayout.INVISIBLE);
      clearText();
      showHideClearButton();
  }
  
  void setValues(String hint, int type) {
      edit_text.setHint(hint);
      edit_text.setInputType(type);
  }
  
  void setValues(String hint) {
      edit_text.setHint(hint);
  }
  
  void setValues(String hint, int type, int lines) {
      edit_text.setHint(hint);
      edit_text.setInputType(type);
      edit_text.setMaxLines(lines);
  }
  
  void clearText() {
      btn_clear.setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              edit_text.setText("");
          }
      });
  }
  
  void showHideClearButton() {
      edit_text.addTextChangedListener(new TextWatcher() {
  
          @Override
          public void onTextChanged(CharSequence s, int start, int before,
                  int count) {
              // TODO Auto-generated method stub
              if (s.length() &gt; 0)
                  btn_clear.setVisibility(RelativeLayout.VISIBLE);
              else
                  btn_clear.setVisibility(RelativeLayout.INVISIBLE);
          }
  
          @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
  
          }
      });
  }
  
  public Editable getText() {
      Editable text = edit_text.getText();
      return text;
  }
  
  public void setText(CharSequence text) {
      edit_text.setText(text);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and my <code>onFocusChange</code> function is:</p>
  
  <pre><code>   email.setOnFocusChangeListener(new ClearableEditText(
              getApplicationContext(), email));
  </code></pre>