The Android Developer Challenge is back! Submit your idea before December 2.


open class TextureViewMeteringPointFactory : MeteringPointFactory

A MeteringPointFactory for creating a MeteringPoint by TextureView and (x,y).

SurfaceTexture in TextureView could be cropped, scaled or rotated by TextureView#getTransform(Matrix). This factory translates the (x, y) into the sensor crop region normalized (x,y) by this transform. SurfaceTexture#getTransformMatrix is also used during the translation. No lens facing information is required because SurfaceTexture#getTransformMatrix contains the necessary transformation corresponding to the lens face of current camera ouput.


Inherited constants

Public constructors

<init>(@NonNull textureView: TextureView)

Protected methods

open PointF

Translates a (x,y) from TextureView.

Inherited functions

Inherited properties

Public constructors


TextureViewMeteringPointFactory(@NonNull textureView: TextureView)

Protected methods


@NonNull protected open fun translatePoint(x: Float, y: Float): PointF

Translates a (x,y) from TextureView.

x Float: the logical x to be translated.
y Float: the logical y to be translated.
PointF: a PointF consisting of translated normalized crop region x/y,