DisplayMetrics metrics = new DisplayMetrics();
WindowManager wm = (WindowManager)
ctx.getSystemService(Context.WINDOW_SERVICE);
int width = wm.getDefaultDisplay().getWidth();
int height = wm.getDefaulDisplay().getHeight();
2011/8/23 Ralph Bergmann <[email protected]>
> 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
--
[wu.kunting]
--
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