On Sun, Jul 22, 2012 at 8:21 AM, Jim Graham <[email protected]> wrote: > That's probably what I'm not clear on.... What is "everything else" > in this case?
It doesn't matter. Put your SurfaceView in your layout, then calculate your preview size based upon the SurfaceView's size. > I see what this is all about now. So display.getWidth/Height reports > the wrong numbers, and View.getWidth() and View.getHeight() returns the > correct display size? No, View's getWidth() and getHeight() return the size of the SurfaceView. You could have a 2px by 2px SurfaceView. You could have a 1080p SurfaceView. The screen size does not matter -- the SurfaceView's size does. Moreover, you are *passed* the height and width to use in surfaceChanged() of your SurfaceHolder.Callback. You do not even need to call getWidth() and getHeight() on the SurfaceView. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- 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

