public abstract class PreviewSize
extends java.lang.Object
implements android.os.Parcelable
Example:
IBarcodeReader
barcodeReader = BarcodeReader.getInstance(context); // Check that 640x480 preview size is available on the front camera boolean expectedSizeIsAvailable = false;List
<PreviewSize
> previewSizes = barcodeReader.getPreviewSizes(CameraTypes
.FRONT); for (PreviewSize
size : previewSizes) { if ((size.getWidth() == 640) && (size.getHeight() == 480)) { expectedSizeIsAvailable = true; break; } } if (expectedSizeIsAvailable) { // Start barcode reader with a 640x480 preview size }
Modifier and Type | Class and Description |
---|---|
static class |
PreviewSize.Builder
Builder.
|
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<PreviewSize> |
CREATOR |
Constructor and Description |
---|
PreviewSize() |
Modifier and Type | Method and Description |
---|---|
static PreviewSize.Builder |
builder() |
abstract java.lang.Integer |
getHeight()
Field specifying the camera preview height.
|
abstract java.lang.Integer |
getWidth()
Field specifying the camera preview width.
|
public static final android.os.Parcelable.Creator<PreviewSize> CREATOR
public abstract java.lang.Integer getWidth()
public abstract java.lang.Integer getHeight()
public static PreviewSize.Builder builder()