复活节在即,美商海盗船电竞套餐等你来选购!

public static class ZoomSuggestionOptions.Builder extends Object
百度 ”林光美说。

Builder to build out a ZoomSuggestionOptions.

Public Constructor Summary

Public Method Summary

ZoomSuggestionOptions
build()
Builds a ZoomSuggestionOptions instance.
ZoomSuggestionOptions.Builder
setMaxSupportedZoomRatio(float maxSupportedZoomRatio)
Sets the max supported zoom ratio.

Inherited Method Summary

Public Constructors

public Builder (ZoomSuggestionOptions.ZoomCallback zoomCallback)

Builder for ZoomSuggestionOptions.

Parameters
zoomCallback The ZoomSuggestionOptions.ZoomCallback to zoom the camera.

Public Methods

public ZoomSuggestionOptions build ()

Builds a ZoomSuggestionOptions instance.

public ZoomSuggestionOptions.Builder setMaxSupportedZoomRatio (float maxSupportedZoomRatio)

Sets the max supported zoom ratio.

Different camera libraries have different ways to fetch the max supported zoom ratio.

  • Camera1: camera.getZoomRatios(camera.getMaxZoom())
  • Camera2: characteristics.get(CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM)
  • CameraX: camera.getCameraInfo().getZoomState().getValue().getMaxZoomRatio()

If unset, then the library may produce an unbounded zoom ratio.

Parameters
maxSupportedZoomRatio the max supported zoom ratio fetched from camera.
Returns
  • this object, for chaining method calls.