title: findViewById in custom view instantiated from XML - when does the layout become available
body: <h3>some_layout.xml with a custom viewgroup and a child</h3>
  
  <pre><code>&lt;com.github.espiandev.showcaseview.ShowcaseView
          xmlns:android="http://schemas.android.com/apk/res/android"
          style="@style/ShowcaseView"&gt;
      &lt;include
          layout="@layout/showcase_button"
          android:id="@id/showcase_button"/&gt;
  &lt;/com.github.espiandev.showcaseview.ShowcaseView&gt;
  </code></pre>
  
  <h3>ShowcaseView.java - when can i access R.id.showcase_button in the custom viewgroup</h3>
  
  <pre><code>private Button mEndButton;
  
  public ShowcaseView(Context context) {
      this(context, null, R.styleable.CustomTheme_showcaseViewStyle);
  }
  
  public ShowcaseView(Context context, AttributeSet attrs) {
      this(context, attrs, R.styleable.CustomTheme_showcaseViewStyle);
  }
  
  public ShowcaseView(Context context, AttributeSet attrs, int defStyle) {
      super(context, attrs, defStyle);
      // cannot be found at this stage, returns null
      mEndButton = (Button) findViewById(R.id.showcase_button);
  }
  </code></pre>
  
  <h3>What View or ViewGroup method should I override or what event should I observe?</h3>
  
  <ul>
  <li>In an Activity the view becomes available after setContentView, but what is the lifecycle of a custom view constructed from an XML file?</li>
  <li>What is the earliest point where findViewById(R.id.showcase_button) will succeed, so as to assign the field?</li>
  </ul>