If I call getMeasuredWidth() or getWidth() for layout in onResume they return 0

Viewed 34970

If I call getMeasuredWidth() or getWidth() for layout in onResume they returns 0. I think that view it's not drawn yet in this moment.

Also I think that I need to put getMeasuredWidth() or getWidth() in callback method called after layout is drawn and view measurements are known. What android callback method should I use?

7 Answers
Related