You need to participate in the view hierarchy as a layout manager, do get
the onSizeChanged() calls and such.

Code like this is almost guaranteed to be broken.  If you want to do stuff
based on view layout, implement a layout manager.

On Tue, Aug 23, 2011 at 4:19 AM, Ralph Bergmann <[email protected]> wrote:

> Hi,
>
>
> where is the right point to get the size of a view after the orientation
> has changed?
>
> I have overwritten the onConfigurationChanged method:
>
> public void onConfigurationChanged(Configuration newConfig) {
>
>   super.onConfigurationChanged(newConfig);
>
>   final int viewWidth = this.content.getWidth();
>   final int viewHeight = this.content.getHeight();
>
>   Log.i("ImageDetailActivity", String.format("onConfigurationChanged
> width: %d - height: %d", viewWidth, viewHeight));
> }
>
> But after the first change I get the size before the change and not
> after the change.
>
>
> Ralph
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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

Reply via email to