I don't think you can get those before they are rendered. The final bounds will be decided only after the view is rendered, which might be different on different screen sizes, of course unless , the views are hard-coded with pixel sizes.
Thanks and Regards, Kumar Bibek On Apr 11, 3:09 am, Mickey <michele.pri...@gmail.com> wrote: > Hi There, > I'm a beginner of Android and I'm trying to understand how I can get > the size of a View (or a ViewGroup) before this is rendered on the > screen. > > What I'm trying to achieve is to apply some animations on some child > views and it would be great if there's a way to know in advance the > size of the parent view (ViewGroup) or any other child view before > this is displayed on the screen so that I can set some animations' > settings based on the measurements of other View objects. > > At the moment, some animations' settings are hard coded which I don't > like at all and I only discovered that I can get the parent view > measurements (height and width) after the ViewGroup is displayed. > > I couldn't find any obvious method or callback and I'm wondering if > there's any or amy technique useful to achieve my goal. > > Thanks in advance for any help. > > Mickey -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.