Class FocusConfig.Builder

    • Constructor Detail

      • FocusConfig.Builder

        FocusConfig.Builder()
    • Method Detail

      • 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

      • 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