I am dynamically creating a board, made of views that are dynamically set in a relative layout. In my onCreate i call the constructor of my Board class that creates everythi
The most elegant solution is to extend RelativeLayout class, then you can just override onSizeChanged:
protected void onSizeChanged (int w, int h, int oldw, int oldh)
If you need to know the size just after inflate you can try to measure view manually: so call measure(...) than layout(...) and then getMeasuredWidth()/getMeasuredHeight should return the correct size. But this is more tricky, don't use it if you're not sure how it works.
After hours that I could not find anything, I wrote this message and immediately discovered this: How to retrieve the dimensions of a view?