DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); ScreenWidth = dm.widthPixels; ScreenHeight = dm.heightPixels;
And then set your main view's height and width to match those values. -niko On Nov 15, 6:13 am, Neilz <neilhorn...@gmail.com> wrote: > Ok, I'm hoping for some luck with the Monday daytime crowd... > > I can't resolve this. I'm even trying to get hold of the height of the > Dialog after it's been drawn, but all I get is -1 or 0: > > LinearLayout frame = (LinearLayout) > layout.findViewById(R.id.dialog_root); > Log.e("Tag", "HEIGHT " + frame.getLayoutParams().height); > Log.e("Tag", "HEIGHT " + frame.getHeight()); > > To recap, I'm trying to stop the dialog growing to a height which is > larger than the screen is capable of displaying. -- 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