Why is it just "usually"? What can I do to change it to "always"?
Quoting the documentation:
If
getRecordingHint()
returnsANY
orVIDEO_ONLY
, though,CameraHost
supplies the preview size viagetPreferredPreviewSizeForVideo()
instead ofgetPreviewSize()
. If you wish to use a different preview size for video, return it, otherwise returnnull
and we will use the results fromgetPreviewSize()
instead.
On API Level 11+, the implementation of SimpleCameraHost
getPreferredPreviewSizeForVideo()
delegates to the getPreferredPreviewSizeForVideo()
implementation on Camera.Parameters
, except for devices known to return poor values for it.
what can I do to display an square? Maybe overlaying a square on top of CameraFragment?
I would try putting CameraView
directly in your own UI, then layering something on top of it, using a FrameLayout
or RelativeLayout
to control the Z-axis ordering.