On Jan 24, 1:22 pm, String <[email protected]> wrote: > Or when you say "when the onCreate method is over", do you mean AFTER > onCreate, in some later event? Which one?
I think Kumar meant that the view hierarchy is available after onOnCreate if you populated there. But that's not exactly what the OP was asking. I think the question was more along the lines of knowing when the DIMENSIONS of your views are available after they have been added to the view hierarchy. Yes, sizes of views will be 0 until Android has finished its first two-pass layout of the view hierarchy. As far as I know, there is no activity lifecycle method that reliably clues you into when you can get the initial dimensions of your views. The only way I've found is to trap the onSizeChanged method of the individual views in question, and in order to do that, you need to be making your own views or subclassing others' views so you can override that method. It would be nice if we could register listeners for this kind of information on any arbitrary View instead of having to subclass and override, but I imagine that would also set us up for horrible memory leaks without taking great care to unregister listeners when they're no longer needed. Doug -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

