Android Composite View Initialization
<p>I'm writing a composite view by overriding a <code>ViewGroup</code>, like so:</p>

<pre><code>public class CompositeView extends RelativeLayout
</code></pre>

<p>I need to perform some one-time initialization after the measurements have been set (i.e. onMeasure has been called) because I need to know the height.</p>

<p>I was thinking of overriding <a href="http://developer.android.com/reference/android/view/View.html#onAttachedToWindow%28%29" rel="nofollow">onAttachedToWindow</a>, but the docs mention that:</p>

<blockquote>
  <p>it may be called any time before the first onDraw -- including before or after onMeasure(int, int).</p>
</blockquote>

<p>What other options do I have?</p>

<p>Thanks</p>
