i have a big problem with a layout in my Android Application. I have a
RelativeLayout
– inside this Layout I will nest a TableLayout (at Top) and another RelativeLayout (at Bottom)
In my program I fill both layouts (programmatically) with some views – first the TableLayout and then the RelativeLayout. I need the height from the nested RelativeLayout to calculate some things. But I always get the height without the height from the “fresh painted” TableLayout.
How can I get a callback (ore something) to recognize that my first layout (TableLayout) is finished and “sticks” at the parent layout? Then I determine the correct amount remaining height (of the nested RelativeLayout).
Probably you need to override the class TableLayout and override it’s methods
onMeasure, onDraw or onAttachedToWindowIt’s not difficult, but a bit tricky to handle when a view is completely drawn on the screen
Check the doc: http://developer.android.com/reference/android/view/View.html#onMeasure(int, int)