I have the same issue and spent a day on this CWAC library (by the way, it is absolutely great). I would like to share my research and hopefully you (and me) would get a working solution soon.
Test Platform: Sony Xperia Z, Android 4.2.2
Test Resolution: 1080x1920.
Available Preview: 1280x720, 960x720, 720x480, 704x576, 640x480, 480x320, 320x240, 176x144.
Target Preview size: 1080x1080, a square, of course :D
Test done inside CameraHost.getPreviewSize() of my custom CameraHost.
If I provide a square view/size to the super class function here, I got 704x576. It is 11:9 (or 1.22222~) which is closest to 1:1 or 1.0. However, it looks blurry when enlarge to 1080 width and also distorted.
1280x720 is 16:9 (1.777~). The device camera got this by cropping the top and bottom (please note that camera is talking in landscape mode).
960x720 is 4:3 (1.333~). This is the full resolution of the device camera. It is my target resolution, where I only want the 720x720 inside 960x720 towards the top edge(portrait) or left edge(landscape).
In your custom CameraHost (extends SimpleCameraHost), limit the preview size:
@Override
public Size getPreviewSize(int orientation, int w, int h, Parameters p) {
Size size = super.getPreviewSize(orientation, 720, 960, p);
ViewGroup.LayoutParams params = cameraView.getLayoutParams();
params.width = 1080;
params.height = 960 * 1080/720;
cameraView.setLayoutParams(params);
return size;
}
layout.xml:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.commonsware.cwac.camera.CameraView
android:id="@+id/cameraView"
android:layout_width="match_parent"
android:layout_gravity="top|center_horizontal"
android:layout_height="match_parent"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.example.android.widget.SquareView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:background="#99e0e0e0">
(your elements to cover up the extra area)
</LinearLayout>
</LinearLayout>
</FrameLayout>
Following is the result and comparing with the system camera, using 4:3.

Note:
- I suppose you know how to create your own SquareView so I won't post the code of it here. You can read more here: Simple way to do dynamic but square layout
- The piece of code in #4 is just test code - you need to figure out how it can be adapt for all devices.
- Do NOT accept click event by the CameraView for focusing. Use the SquareView instead.