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