title: Get parent Width and Height
body: <p>I've create a custom view based on <code>LinearLayout</code> and I need to calculate the layout width and height according to the parent view but each time I use <code>((View)this.getParent()).getMeasuredWidth()</code> I got <code>0</code> -  I guess that I called this function too early!</p>
  
  <p>Any ideas to how accomplish this functionality?</p>