I have a unknown number of TextView elements some EditText elements and so on, that are all placed in one linear layout… And I want to calculate the height of the layout at run time so I can get the exact size in pixels for different resolution screens. Some editboxes can contain more text then other so their size will be bigger…
Is there possibility to calculate the size of a layout at runtime ?
Thanks
To get height of layout you have to write the code in onWindowFocusChanged() method.
First get the layout in
onCreate()method then write the following code.Thanks
Deepak