[android-developers] Re: How to know a view size before it's rendered

2010-04-10 Thread Kumar Bibek
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

[android-developers] Re: How to know a view size before it's rendered

2010-04-11 Thread Mickey
Hi, I find really hard to imagine that there's no way to know the actual Views' size before they are displayed. I was expecting a sort of callback method on the Activity class or any listener on the View (or ViewGroup) to be implemeted so that I can get the size of UI components. Anyway, I found

Re: [android-developers] Re: How to know a view size before it's rendered

2010-04-10 Thread Martin Obreshkov
http://developer.android.com/reference/android/view/View.html#onMeasure(int, int) On Sun, Apr 11, 2010 at 7:56 AM, Kumar Bibek wrote: > 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 diff

Re: [android-developers] Re: How to know a view size before it's rendered

2010-04-11 Thread Mark Murphy
Mickey wrote: > I was expecting a sort of callback method on the Activity class or any > listener on the View (or ViewGroup) to be implemeted so that I can get > the size of UI components. There are callbacks on View for this, onLayout() and onMeasure(). If you need to implement custom layout rul