title: Android - Views in Custom Compound Component are not inflated (findByView returns null)
body: <p>I have made a Custom Component in XML, consisting of a button with an imageview stacked on top of it:</p>
  
  <pre><code>&lt;myapp.widget.ClearableCaptionedButton
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"&gt;
  &lt;Button
      android:id="@+id/ccbutton_button"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:gravity="center_vertical|left"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:background="@android:drawable/edit_text"/&gt;
  &lt;ImageView
      android:id="@+id/ccbutton_clear"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginRight="5dip"
      android:layout_alignRight="@id/ccbutton_button"
      android:layout_alignTop="@id/ccbutton_button"
      android:layout_alignBottom="@id/ccbutton_button"/&gt;
    &lt;/myapp.widget.ClearableCaptionedButton&gt;
  </code></pre>
  
  <p>extract of java source code:</p>
  
  <pre><code>public class ClearableCaptionedButton extends RelativeLayout implements OnClickListener {
  ...
  public ClearableCaptionedButton(Context context, AttributeSet attrs) {
      super(context, attrs);
  // some stuff that works fine
  }
  ..
  
  protected void onFinishInflate() {
    super.onFinishInflate();
  
    mButton = (Button) findViewById(R.id.ccbutton_button);
    mClear = (ImageView) findViewById(R.id.ccbutton_clear);
  
    mButton.setText("");  // error here: mButton == null
  }
  </code></pre>
  
  <p>My problem is similar to <a href="https://stackoverflow.com/questions/1691569/findviewbyid-returns-null-for-custom-component-in-layout-xml-not-for-other-com">this</a> one. When i try to find the views inside the custom compound, findViewById returns null. But, as you can see, i already added super(context, attrs); to the constructor.
  i am using the custom component directly in xml layout, like this:</p>
  
  <pre><code>&lt;LinearLayout&gt;
  &lt;!-- some stuff --&gt;
  &lt;myapp.widget.ClearableCaptionedButton
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"
                      app:caption="to"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>can anybody spot something? thanks.</p>