public class CameraUtils
extends java.lang.Object
| Constructor and Description |
|---|
CameraUtils() |
| Modifier and Type | Method and Description |
|---|---|
static android.hardware.Camera.Size |
getOptimalPreviewSize(android.hardware.Camera camera,
int w,
int h)
Iterate over supported camera preview sizes to see which one best fits the
dimensions of the given view while maintaining the aspect ratio.
|
static void |
setCameraPreviewOrientation(android.content.Context context,
android.hardware.Camera camera) |
static void |
stopPreview(android.hardware.Camera camera) |
public static android.hardware.Camera.Size getOptimalPreviewSize(android.hardware.Camera camera,
int w,
int h)
camera - Camera obj.w - The width of the view.h - The height of the view.public static void setCameraPreviewOrientation(android.content.Context context,
android.hardware.Camera camera)
public static void stopPreview(android.hardware.Camera camera)