Package org.robolectric.shadows
Class ShadowCamera.ShadowParameters
java.lang.Object
org.robolectric.shadows.ShadowCamera.ShadowParameters
- Enclosing class:
- ShadowCamera
@Implements(android.hardware.Camera.Parameters.class) public static class ShadowCamera.ShadowParameters extends Object
Shadows the Android
Camera.Parameters
class.-
Constructor Summary
Constructors Constructor Description ShadowParameters()
-
Method Summary
Modifier and Type Method Description void
addSupportedPreviewSize(int width, int height)
Add custom preview sizes to supportedPreviewSizes.protected String
get(String key)
protected int
getExposureCompensation()
protected float
getExposureCompensationStep()
protected String
getFlashMode()
protected List<Camera.Area>
getFocusAreas()
protected String
getFocusMode()
protected int
getMaxExposureCompensation()
protected int
getMaxNumFocusAreas()
protected int
getMaxNumMeteringAreas()
protected List<Camera.Area>
getMeteringAreas()
protected int
getMinExposureCompensation()
int
getPictureHeight()
protected Camera.Size
getPictureSize()
int
getPictureWidth()
protected int
getPreviewFormat()
protected void
getPreviewFpsRange(int[] range)
protected int
getPreviewFrameRate()
int
getPreviewHeight()
protected Camera.Size
getPreviewSize()
int
getPreviewWidth()
protected List<String>
getSupportedFlashModes()
protected List<String>
getSupportedFocusModes()
protected List<Integer>
getSupportedPictureFormats()
protected List<Camera.Size>
getSupportedPictureSizes()
protected List<Integer>
getSupportedPreviewFormats()
protected List<int[]>
getSupportedPreviewFpsRange()
protected List<Integer>
getSupportedPreviewFrameRates()
protected List<Camera.Size>
getSupportedPreviewSizes()
void
initSupportedPreviewSizes()
Explicitly initialize custom preview sizes array, to switch from default values to individually added.protected void
set(String key, String value)
protected void
setExposureCompensation(int compensation)
protected void
setFlashMode(String flashMode)
protected void
setFocusAreas(List<Camera.Area> focusAreas)
protected void
setFocusMode(String focusMode)
void
setMaxNumFocusAreas(int maxNumFocusAreas)
Allows test cases to set the maximum number of focus areas.void
setMaxNumMeteringAreas(int maxNumMeteringAreas)
Allows test cases to set the maximum number of metering areas.protected void
setMeteringAreas(List<Camera.Area> meteringAreas)
protected void
setPictureSize(int width, int height)
protected void
setPreviewFormat(int pixel_format)
protected void
setPreviewFpsRange(int min, int max)
protected void
setPreviewFrameRate(int fps)
protected void
setPreviewSize(int width, int height)
protected void
setRecordingHint(boolean recordingHint)
protected void
setRotation(int rotation)
void
setSupportedFlashModes(String... flashModes)
void
setSupportedFocusModes(String... focusModes)
-
Constructor Details
-
ShadowParameters
public ShadowParameters()
-
-
Method Details
-
initSupportedPreviewSizes
public void initSupportedPreviewSizes()Explicitly initialize custom preview sizes array, to switch from default values to individually added. -
addSupportedPreviewSize
public void addSupportedPreviewSize(int width, int height)Add custom preview sizes to supportedPreviewSizes. -
getPictureSize
-
getPreviewFormat
-
getPreviewFpsRange
-
getPreviewFrameRate
-
getPreviewSize
-
getSupportedPictureSizes
-
getSupportedPictureFormats
-
getSupportedPreviewFormats
-
getSupportedPreviewFpsRange
-
getSupportedPreviewFrameRates
-
getSupportedPreviewSizes
-
setSupportedFocusModes
-
getSupportedFocusModes
-
getFocusMode
-
setFocusMode
-
setMaxNumFocusAreas
public void setMaxNumFocusAreas(int maxNumFocusAreas)Allows test cases to set the maximum number of focus areas. SeeCamera.Parameters.getMaxNumFocusAreas()
. -
getMaxNumFocusAreas
-
setFocusAreas
-
getFocusAreas
-
setMaxNumMeteringAreas
public void setMaxNumMeteringAreas(int maxNumMeteringAreas)Allows test cases to set the maximum number of metering areas. SeeCamera.Parameters.getMaxNumMeteringAreas()
. -
getMaxNumMeteringAreas
-
setMeteringAreas
-
getMeteringAreas
-
setPictureSize
-
setPreviewFormat
-
setPreviewFpsRange
-
setPreviewFrameRate
-
setPreviewSize
-
setRecordingHint
-
setRotation
-
getMinExposureCompensation
-
getMaxExposureCompensation
-
getExposureCompensationStep
-
getExposureCompensation
-
setExposureCompensation
-
setSupportedFlashModes
-
getSupportedFlashModes
-
getFlashMode
-
setFlashMode
-
set
-
get
-
getPreviewWidth
public int getPreviewWidth() -
getPreviewHeight
public int getPreviewHeight() -
getPictureWidth
public int getPictureWidth() -
getPictureHeight
public int getPictureHeight()
-