How to find/watch the dimensions of a view in a NativeScript layout? : <p>When my layout loads any view inside of it has a width and height of <code>NaN</code>, it also has a <code>getMeasuredHeight()</code> and <code>getMeasuredWidth()</code> of <code>0</code>.</p>

<p>At some point <code>getMeasuredHeight()</code> and <code>getMeasuredWidth()</code> (after the layout is laid out I guess) receive useful values.</p>

<p>How can I get the dimensions of anything? How can I watch them change?? When will <code>.width</code> and <code>.height</code> ever not be <code>NaN</code>??? Why can't I make a view hover over the entire screen????</p>

<p>So far I've been <strong>polling</strong> every 100ms and I feel pretty dumb. Please help.</p>
