Class FocusConfig.Builder
-
- All Implemented Interfaces:
@Deprecated() public class FocusConfig.Builder
A builder to create a FocusConfig
-
-
Field Summary
Fields Modifier and Type Field Description public String
defaultMode
-
Constructor Summary
Constructors Constructor Description FocusConfig.Builder()
-
Method Summary
Modifier and Type Method Description String
getDefaultMode()
FocusConfig.Builder
setDefaultMode(String defaultMode)
The default focus mode for devices that have no special internal treatment. FocusConfig.Builder
setAutoFocusInterval(int millis)
Set an auto focus interval. FocusConfig.Builder
setEnablePhaseAutoFocus(boolean isEnabled)
Enable or disable the phase auto focus. FocusConfig.Builder
setEnableFocusAreas(boolean isEnabled)
Enable or disable focus areas for the cut-out rectangle. FocusConfig.Builder
setEnableAutoExposureAreas(boolean isEnabled)
Enable or disable auto exposure areas for the cut-out rectangle. FocusConfig.Builder
setEnableFocusOnTouch(boolean isEnabled)
Enable or disable focus on touch. FocusConfig
build()
Create the config. FocusConfig.Builder
setUpdateAreasOnAutoFocus(boolean updateAreasOnAutoFocus)
set to true if the areas should be slightly changed before every auto focus call. -
-
Method Detail
-
getDefaultMode
String getDefaultMode()
-
setDefaultMode
FocusConfig.Builder setDefaultMode(String defaultMode)
The default focus mode for devices that have no special internal treatment.
- Parameters:
defaultMode
- - the default focus mode- Returns:
this builder
-
setAutoFocusInterval
FocusConfig.Builder setAutoFocusInterval(int millis)
Set an auto focus interval. If this is set, a timer is started who calls auto focus every given millis. (Don't use smaller steps than 500ms)
- Parameters:
millis
- - the interval in millis to call auto focus in- Returns:
this builder
-
setEnablePhaseAutoFocus
FocusConfig.Builder setEnablePhaseAutoFocus(boolean isEnabled)
Enable or disable the phase auto focus. Devices which offer this functionality will generally focus much faster and more precise.
- Parameters:
isEnabled
- - true if phase auto focus should be enabled- Returns:
this builder
-
setEnableFocusAreas
FocusConfig.Builder setEnableFocusAreas(boolean isEnabled)
Enable or disable focus areas for the cut-out rectangle. Particularly good, when cut-out rectangle is not in the middle of the screen.
TODO document api break, this does not influences the focus mode anymore (this used to set the focus mode to AUTO)- Parameters:
isEnabled
- - true if focus areas should be enabled- Returns:
this builder
-
setEnableAutoExposureAreas
FocusConfig.Builder setEnableAutoExposureAreas(boolean isEnabled)
Enable or disable auto exposure areas for the cut-out rectangle.
- Parameters:
isEnabled
- - true if auto exposure areas should be enabled- Returns:
this builder
-
setEnableFocusOnTouch
FocusConfig.Builder setEnableFocusOnTouch(boolean isEnabled)
Enable or disable focus on touch. Only available for auto focus- or macro mode.
- Parameters:
isEnabled
- - true if focus on touch should be enabled- Returns:
this builder
-
build
FocusConfig build()
Create the config.
- Returns:
the config.
-
setUpdateAreasOnAutoFocus
FocusConfig.Builder setUpdateAreasOnAutoFocus(boolean updateAreasOnAutoFocus)
set to true if the areas should be slightly changed before every auto focus call. Only used for API 1.
- Parameters:
updateAreasOnAutoFocus
- true to enable- Returns:
this builder
-
-
-
-