I want to determine the available height and width of the parent layout to which I have to add my view.
I have used many methods on layout like
- layout.getHeight()
- layout.getRootView().getHeight()
All these methods return 0(zero) as the result.
My main requirement is to be able to give width to a view that is some % of the width of the layout .
Also I dont want to use tag for this. I want to do it through code.
Thanks in advance.