I am coding an app for android which uses SurfaceView class to realize camera preview, which works well on Nexus Galaxy and Desire HD
The surface view layout width/height attribute is match_parent
But I encountered a problem: On SONY Xperia Z , the screen resolution is 1080p , but the largest preview resolution is 1280*720
Thus, my camera preview occupies only a part of full screen and other space are blank.
How can I make my preview full screen ?