I have designed an layout in which LinearLayout has 2 children LinearLayout and FrameLayout and in each child I put different views.>
LinearLayout
FrameLayout
I think you are getting Height and Width in OnCreate() method that's why you getting always 0 values because at that time your view still not created.
Try to get height and width on some button click or else..