When can I find out the width/height of my view
- by michael
When is the earliest I can find out the actual (after layout) width/height of my view?
I tried to do that
@Override
protected void onFinishInflate() {
super.onFinishInflate();
w = getWidth();
h = getHeight();
}
But it gives me 0. I have cases in which the view is invisible in the beginning and that programmically become visible.
I think I can do that in onDraw(), but i dont' want to do that in everything I draw() something.