Package com.naver.ads.video.player
Class ResizableTextureView
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.accessibility.AccessibilityEventSource
public final class ResizableTextureView extends TextureView
TextureView that can resize.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public @interfaceResizableTextureView.ResizeTypepublic @interfaceResizableTextureView.AnchorType
-
Field Summary
Fields Modifier and Type Field Description private TransformOptiontransformOption
-
Constructor Summary
Constructors Constructor Description ResizableTextureView(Context context, AttributeSet attrs, Integer defStyleAttr)Constructs a new ResizableTextureView instance. ResizableTextureView(Context context, AttributeSet attrs)Constructs a new ResizableTextureView instance. ResizableTextureView(Context context)Constructs a new ResizableTextureView instance.
-
Method Summary
Modifier and Type Method Description final TransformOptiongetTransformOption()set null to reset any transform(=Identity matrix) final UnitsetTransformOption(TransformOption transformOption)final UnitsetAspectRatio(Float aspectRatio)Sets new aspect ratio. final UnitsetResizeType(Integer resizeType)Sets the ResizeType. final UnitsetTransformOptions(Integer anchorType, Float targetWidth, Float targetHeight, Float translateX, Float translateY)Sets the transform options. UnitonLayout(Boolean changed, Integer left, Integer top, Integer right, Integer bottom)UnitonMeasure(Integer widthMeasureSpec, Integer heightMeasureSpec)-
-
Constructor Detail
-
ResizableTextureView
ResizableTextureView(Context context, AttributeSet attrs, Integer defStyleAttr)
Constructs a new ResizableTextureView instance.- Parameters:
context- the context.attrs- the attributes.defStyleAttr- the default style attributes.
-
ResizableTextureView
ResizableTextureView(Context context, AttributeSet attrs)
Constructs a new ResizableTextureView instance.- Parameters:
context- the context.attrs- the attributes.
-
ResizableTextureView
ResizableTextureView(Context context)
Constructs a new ResizableTextureView instance.- Parameters:
context- the context.
-
-
Method Detail
-
getTransformOption
final TransformOption getTransformOption()
set null to reset any transform(=Identity matrix)
-
setTransformOption
final Unit setTransformOption(TransformOption transformOption)
-
setAspectRatio
final Unit setAspectRatio(Float aspectRatio)
Sets new aspect ratio.
-
setResizeType
final Unit setResizeType(Integer resizeType)
Sets the ResizeType.
-
setTransformOptions
final Unit setTransformOptions(Integer anchorType, Float targetWidth, Float targetHeight, Float translateX, Float translateY)
Sets the transform options.
- Parameters:
anchorType- the anchor type.targetWidth- the target width.targetHeight- the target height.translateX- the horizontal location of this view relative to its left position.translateY- the vertical location of this view relative to its top position.
-
-
-
-