Package com.naver.ads.ui
Class NasTextView
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewTreeObserver.OnPreDrawListener,android.view.accessibility.AccessibilityEventSource,com.naver.ads.ui.AspectRatioDecorator,com.naver.ads.ui.NasDecorator,com.naver.ads.ui.RoundCornerDecorator
public class NasTextView extends TextView implements NasDecorator
-
-
Constructor Summary
Constructors Constructor Description NasTextView(Context context, AttributeSet attrs, Integer defStyleAttr)NasTextView(Context context, AttributeSet attrs)NasTextView(Context context)
-
Method Summary
Modifier and Type Method Description final UnitsetCornerRadius(Float cornerRadius)Sets the radius for each corner. UnitsetCornerRadius(Float topLeft, Float topRight, Float bottomRight, Float bottomLeft)Sets different radius for each corners. final UnitsetBorderColor(Integer borderColor)Sets the color to be used for the border line. final UnitsetBorderWidth(Float borderWidth)Sets the width that will be used for the border line. final UnitsetAspectRatio(Float aspectRatio)Sets the aspect ratio that this view should satisfy. final UnitsetAspectRatioListener(AspectRatioDecorator.AspectRatioListener aspectRatioListener)Sets the AspectRatioListener. final UnitsetResizeMode(AspectRatioDecorator.ResizeMode resizeMode)Sets the ResizeMode. Unitdraw(Canvas canvas)UnitdispatchDraw(Canvas canvas)UnitonMeasure(Integer widthMeasureSpec, Integer heightMeasureSpec)UnitonSizeChanged(Integer w, Integer h, Integer oldw, Integer oldh)-
-
Constructor Detail
-
NasTextView
NasTextView(Context context, AttributeSet attrs, Integer defStyleAttr)
-
NasTextView
NasTextView(Context context, AttributeSet attrs)
-
NasTextView
NasTextView(Context context)
-
-
Method Detail
-
setCornerRadius
final Unit setCornerRadius(Float cornerRadius)
Sets the radius for each corner.
- Parameters:
cornerRadius- the radius for each corner to set.
-
setCornerRadius
Unit setCornerRadius(Float topLeft, Float topRight, Float bottomRight, Float bottomLeft)
Sets different radius for each corners.
- Parameters:
topLeft- the radius of top-left cornertopRight- the radius of top-right cornerbottomRight- the radius of bottom-right cornerbottomLeft- the radius of bottom-left corner
-
setBorderColor
final Unit setBorderColor(Integer borderColor)
Sets the color to be used for the border line. By default
Color.Transparentis used.- Parameters:
borderColor- the color to be used for the border line.
-
setBorderWidth
final Unit setBorderWidth(Float borderWidth)
Sets the width that will be used for the border line. By default 0 is used.
-
setAspectRatio
final Unit setAspectRatio(Float aspectRatio)
Sets the aspect ratio that this view should satisfy.
- Parameters:
aspectRatio- the with to height ratio.
-
setAspectRatioListener
final Unit setAspectRatioListener(AspectRatioDecorator.AspectRatioListener aspectRatioListener)
Sets the AspectRatioListener.
- Parameters:
aspectRatioListener- the listener to be notified about aspect ratios changes, or null to clear a listener that was previously set.
-
setResizeMode
final Unit setResizeMode(AspectRatioDecorator.ResizeMode resizeMode)
Sets the ResizeMode.
- Parameters:
resizeMode- the ResizeMode.
-
dispatchDraw
Unit dispatchDraw(Canvas canvas)
-
-
-
-