CurvedTextView

Added in 1.2.0

class CurvedTextView : View, ArcLayout.Widget


CurvedTextView is a component allowing developers to easily write curved text following the curvature of the largest circle that can be inscribed in the view. ArcLayout could be used to concatenate multiple curved texts, also layout together with other widgets such as icons.

Summary

Public constructors

CurvedTextView(context: Context, attrs: AttributeSet?)
CurvedTextView(context: Context, attrs: AttributeSet?, defStyle: Int)
CurvedTextView(
    context: Context,
    attrs: AttributeSet?,
    defStyle: Int,
    defStyleRes: Int
)

Public functions

Unit
Unit
draw(canvas: Canvas)
@FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float

Returns the anchor angle used for positioning the text, in degrees.

Int

Returns the anchor type for positioning the curved text

TextUtils.TruncateAt?

Returns where, if anywhere, words that are longer than the view is wide should be ellipsized.

String?

Returns the font feature settings.

String?

Returns TrueType or OpenType font variation settings.

Float

Gets the text letter-space value, which determines the spacing between characters.

@FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float

Returns the maximum sweep angle in degrees for rendering the text

@FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float

Returns the sweep angle in degrees for rendering the text

@FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float

Returns the sweep angle that this widget is drawn with.

String?

Returns the text to be rendered

@ColorInt Int

Returns the color for rendering the text

Float

Returns the text size for rendering the text

@Px Int

Returns the thickness of this widget inside the arc.

Typeface?

Gets the current Typeface that is used to style the text.

Boolean

Returns the curved text layout direction

Boolean

See isPointInsideClickArea

Unit
Unit
Boolean
Unit
setAnchorAngleDegrees(
    value: @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float
)

Sets the anchor angle used for positioning the text, in degrees.

Unit

Sets the anchor type for positioning the curved text.

Unit

Sets the curved text layout direction

Unit

Causes words in the text that are longer than the view's width to be ellipsized.

Unit

Sets font feature settings.

Unit

Sets TrueType or OpenType font variation settings.

Unit

Sets text letter-spacing in ems.

Unit
setSweepAngleDegrees(
    angleDegrees: @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float
)

Set the sweep angle that this widget is drawn with.

Unit
setSweepRangeDegrees(
    minSweep: @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float,
    maxSweep: @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float
)

Sets the minimum and maximum sweep angle in degrees for rendering the text.

Unit
setText(value: String?)

Sets the text to be rendered

Unit

Sets the color for rendering the text

Unit

Sets the text size for rendering the text

Unit

Sets the typeface and style in which the text should be displayed.

Unit
setTypeface(tf: Typeface?, style: Int)

Sets the typeface and style in which the text should be displayed, and turns on the fake bold and italic bits in the Paint if the Typeface that you provided does not have all the bits in the style that you specified.

Protected functions

Unit
onDraw(canvas: Canvas)
Unit
onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)
Unit
onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int)

Inherited Constants

From android.view.View
const Int
const Int
const Int
const Int
const Int
const Int
const Property<View!, Float!>!
const Int
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE = "creditCardExpirationDate"
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY = "creditCardExpirationDay"
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = "creditCardExpirationMonth"
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = "creditCardExpirationYear"
const String!
const String!
AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE = "creditCardSecurityCode"
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int
const Int
const Int
const Int
const Int
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int
const Int
const Int
const Int
const Int
const Int
GONE = 8
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
KEEP_SCREEN_ON = 67108864
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
NO_ID = -1
const Int
const Int
const Int
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const String!
VIEW_LOG_TAG = "View"
const Int
const IntArray<Int>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!

Inherited functions

From android.view.View
Unit
Unit
addExtraDataToAccessibilityNodeInfo(
    info: AccessibilityNodeInfo!,
    extraDataKey: String!,
    arguments: Bundle!
)
Unit
addFocusables(views: ArrayList<View!>!, direction: Int)
Unit
addKeyboardNavigationClusters(
    views: (Mutable)Collection<View!>!,
    direction: Int
)
Unit
Unit
Unit
Unit
ViewPropertyAnimator!
Unit
Unit
Boolean
Unit
Unit

This function is deprecated.

Unit
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Unit
Unit
Unit
Boolean
Unit
Unit
Unit
java-static Int
combineMeasuredStates(curState: Int, newState: Int)
Int
Int
Int
Unit
WindowInsets!
computeSystemWindowInsets(in: WindowInsets!, outLocalInsets: Rect!)
Int
Int
Int
AccessibilityNodeInfo!
Unit
Unit

This function is deprecated.

WindowInsets!
Boolean
Unit
Unit
dispatchCreateViewTranslationRequest(
    viewIds: (Mutable)Map<AutofillId!, LongArray!>!,
    supportedFormats: IntArray!,
    capability: TranslationCapability!,
    requests: (Mutable)List<ViewTranslationRequest!>!
)
Unit
Boolean
Unit
dispatchDraw(canvas: Canvas!)
Unit
Unit
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
dispatchNestedFling(velocityX: Float, velocityY: Float, consumed: Boolean)
Boolean
dispatchNestedPreFling(velocityX: Float, velocityY: Float)
Boolean
dispatchNestedPrePerformAccessibilityAction(
    action: Int,
    arguments: Bundle!
)
Boolean
dispatchNestedPreScroll(
    dx: Int,
    dy: Int,
    consumed: IntArray!,
    offsetInWindow: IntArray!
)
Boolean
dispatchNestedScroll(
    dxConsumed: Int,
    dyConsumed: Int,
    dxUnconsumed: Int,
    dyUnconsumed: Int,
    offsetInWindow: IntArray!
)
Unit
Boolean
Unit
Unit
Unit
Unit
Unit
dispatchScrollCaptureSearch(
    localVisibleRect: Rect!,
    windowOffset: Point!,
    targets: Consumer<ScrollCaptureTarget!>!
)
Unit
Unit
Unit
Unit
Unit

This function is deprecated.

Boolean
Boolean
Boolean
dispatchUnhandledMove(focused: View!, direction: Int)
Unit
dispatchVisibilityChanged(changedView: View!, visibility: Int)
Unit
Unit
Unit
WindowInsets!
dispatchWindowInsetsAnimationProgress(
    insets: WindowInsets!,
    runningAnimations: (Mutable)List<WindowInsetsAnimation!>!
)
WindowInsetsAnimation.Bounds!
Unit

This function is deprecated.

Unit
Unit
Unit
View!
OnBackInvokedDispatcher!
T!
<T : View?> findViewById(id: Int)
T!
<T : View?> findViewWithTag(tag: Any!)
Unit
findViewsWithText(
    outViews: ArrayList<View!>!,
    searched: CharSequence!,
    flags: Int
)
Boolean

This function is deprecated.

View!
focusSearch(direction: Int)
Unit
forceHasOverlappingRendering(hasOverlappingRendering: Boolean)
Unit
Boolean
Unit
generateDisplayHash(
    hashAlgorithm: String!,
    bounds: Rect!,
    executor: Executor!,
    callback: DisplayHashResultCallback!
)
java-static Int
CharSequence!
View.AccessibilityDelegate!
Int
AccessibilityNodeProvider!
CharSequence!
Int
Int
String!
String!
Float
Animation!
Matrix!
IBinder!
IntArray<Int>!
(Mutable)Map<Int!, Int!>!
Array<String!>!
AutofillId!
Int
AutofillValue!
Drawable!
BlendMode!
ColorStateList!
PorterDuff.Mode!
Int
Int
Float
Int
Float
Rect!
Boolean
getClipBounds(outRect: Rect!)
Boolean
ContentCaptureSession!
CharSequence!
Context!
ContextMenu.ContextMenuInfo!
Boolean
java-static Int
getDefaultSize(size: Int, measureSpec: Int)
Display!
IntArray<Int>!
Bitmap!

This function is deprecated.

Int

This function is deprecated.

Int

This function is deprecated.

Unit
getDrawingRect(outRect: Rect!)
Long
Float
Int
Boolean
Boolean
Int
ArrayList<View!>!
getFocusables(direction: Int)
Unit
Drawable!
Int
BlendMode!
ColorStateList!
PorterDuff.Mode!
Boolean
getGlobalVisibleRect(r: Rect!, globalOffset: Point!)
Handler!
Float
Float
Float
Float
Runnable!
Boolean
Int
Unit
getHitRect(outRect: Rect!)
Int
Int
Drawable!
Drawable!
Int
Int
Int
Int
Boolean
KeyEvent.DispatcherState!
Int
Int
Int
ViewGroup.LayoutParams!
Int
Float
Int
Boolean
Unit
Unit
Unit
Matrix!
Int
Int
Int
Int
Int
Int
Int
Int
Int
Int
Int
Int
Int
View.OnFocusChangeListener!
Int
ViewOutlineProvider!
Int
Int
ViewOverlay!
Int
Int
Int
Int
Int
Int
ViewParent!
ViewParent!
Float
Float
PointerIcon!
(Mutable)List<Rect!>!
Array<String!>!
Resources!
Boolean
Int
Float
Int
AttachedSurfaceControl!
View!
WindowInsets!
Float
Float
Float
Float
Float
Int
Int
Int
Int
Int
Int
Int
Int
Int
Int
CharSequence!
StateListAnimator!
Int
Int
(Mutable)List<Rect!>!
Int

This function is deprecated.

Any!
Int
Int
CharSequence!
Int
Float
Int
TouchDelegate!
ArrayList<View!>!
Float
String!
Float
Float
Float
Long
Int
Int
Drawable!
Drawable!
Int
ViewTranslationResponse!
ViewTreeObserver!
Int
Int
Int
WindowId!
WindowInsetsController!
Int

This function is deprecated.

IBinder!
Int
Unit
Float
Float
Float
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
java-static View!
inflate(context: Context!, resource: Int, root: ViewGroup!)
Unit
invalidate(dirty: Rect!)

This function is deprecated.

Unit
Unit
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean

This function is deprecated.

Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Unit
View!
keyboardNavigationClusterSearch(currentCluster: View!, direction: Int)
Unit
layout(l: Int, t: Int, r: Int, b: Int)
Unit
measure(widthMeasureSpec: Int, heightMeasureSpec: Int)
java-static IntArray<Int>!
mergeDrawableStates(baseState: IntArray!, additionalState: IntArray!)
Unit
Unit
Unit
Unit
WindowInsets!
Unit
Unit
Boolean
Boolean
Unit
Unit
IntArray<Int>!
InputConnection!
Unit
onCreateViewTranslationRequest(
    supportedFormats: IntArray!,
    requestsCollector: Consumer<ViewTranslationRequest!>!
)
Unit
onCreateVirtualViewTranslationRequests(
    virtualIds: LongArray!,
    supportedFormats: IntArray!,
    requestsCollector: Consumer<ViewTranslationRequest!>!
)
Unit
Unit
Boolean
Unit
Unit
Boolean
Unit
Unit
Unit
onFocusChanged(
    gainFocus: Boolean,
    direction: Int,
    previouslyFocusedRect: Rect!
)
Boolean
Unit
Boolean
Unit
Boolean
onKeyDown(keyCode: Int, event: KeyEvent!)
Boolean
onKeyLongPress(keyCode: Int, event: KeyEvent!)
Boolean
onKeyMultiple(keyCode: Int, repeatCount: Int, event: KeyEvent!)
Boolean
onKeyPreIme(keyCode: Int, event: KeyEvent!)
Boolean
onKeyShortcut(keyCode: Int, event: KeyEvent!)
Boolean
onKeyUp(keyCode: Int, event: KeyEvent!)
Unit
onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int)
Unit
onOverScrolled(
    scrollX: Int,
    scrollY: Int,
    clampedX: Boolean,
    clampedY: Boolean
)
Unit
Unit
Unit
Unit
Unit
Unit
ContentInfo!
PointerIcon!
onResolvePointerIcon(event: MotionEvent!, pointerIndex: Int)
Unit
Unit
onRtlPropertiesChanged(layoutDirection: Int)
Parcelable!
Unit
onScreenStateChanged(screenState: Int)
Unit
onScrollCaptureSearch(
    localVisibleRect: Rect!,
    windowOffset: Point!,
    targets: Consumer<ScrollCaptureTarget!>!
)
Unit
onScrollChanged(l: Int, t: Int, oldl: Int, oldt: Int)
Boolean
onSetAlpha(alpha: Int)
Unit
Boolean
Unit
Unit
Unit
Unit
onVisibilityChanged(changedView: View!, visibility: Int)
Unit
onWindowFocusChanged(hasWindowFocus: Boolean)
Unit

This function is deprecated.

Unit
Boolean
overScrollBy(
    deltaX: Int,
    deltaY: Int,
    scrollX: Int,
    scrollY: Int,
    scrollRangeX: Int,
    scrollRangeY: Int,
    maxOverScrollX: Int,
    maxOverScrollY: Int,
    isTouchEvent: Boolean
)
Boolean
performAccessibilityAction(action: Int, arguments: Bundle!)
Boolean
Boolean
Boolean
performHapticFeedback(feedbackConstant: Int)
Boolean
ContentInfo!
Unit
playSoundEffect(soundConstant: Int)
Boolean
post(action: Runnable!)
Boolean
postDelayed(action: Runnable!, delayMillis: Long)
Unit
Unit
postInvalidateDelayed(delayMilliseconds: Long)
Unit
Unit
Unit
postOnAnimationDelayed(action: Runnable!, delayMillis: Long)
Unit
Unit
Boolean
Unit
Unit
Unit
Unit
Unit

This function is deprecated.

Boolean
Boolean
Unit
Unit
Boolean
Unit
T!
<T : View?> requireViewById(id: Int)
Unit
java-static Int
resolveSize(size: Int, measureSpec: Int)
java-static Int
resolveSizeAndState(size: Int, measureSpec: Int, childMeasuredState: Int)
Boolean
Unit
Unit
saveAttributeDataForStyleable(
    context: Context!,
    styleable: IntArray!,
    attrs: AttributeSet!,
    t: TypedArray!,
    defStyleAttr: Int,
    defStyleRes: Int
)
Unit
Unit
scheduleDrawable(who: Drawable!, what: Runnable!, when: Long)
Unit
scrollBy(x: Int, y: Int)
Unit
scrollTo(x: Int, y: Int)
Unit
Unit
Unit
setAccessibilityDataSensitive(accessibilityDataSensitive: Int)
Unit
Unit
Unit
Unit
setAccessibilityPaneTitle(accessibilityPaneTitle: CharSequence!)
Unit
Unit
Unit
setActivated(activated: Boolean)
Unit
setAllowClickWhenDisabled(clickableWhenDisabled: Boolean)
Unit
Unit
Unit
setAlpha(alpha: Float)
Unit
setAnimation(animation: Animation!)
Unit
Unit
Unit
setAutofillHints(autofillHints: Array<String!>!)
Unit
Unit
setBackground(background: Drawable!)
Unit
Unit

This function is deprecated.

Unit
Unit
Unit
Unit
Unit
setBottom(bottom: Int)
Unit
Unit
setClickable(clickable: Boolean)
Unit
setClipBounds(clipBounds: Rect!)
Unit
setClipToOutline(clipToOutline: Boolean)
Unit
Unit
setContentDescription(contentDescription: CharSequence!)
Unit
setContextClickable(contextClickable: Boolean)
Unit
setDefaultFocusHighlightEnabled(defaultFocusHighlightEnabled: Boolean)
Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
Unit
setElevation(elevation: Float)
Unit
setEnabled(enabled: Boolean)
Unit
Unit
Unit
setFitsSystemWindows(fitSystemWindows: Boolean)
Unit
setFocusable(focusable: Boolean)
Unit
setFocusableInTouchMode(focusableInTouchMode: Boolean)
Unit
setFocusedByDefault(isFocusedByDefault: Boolean)
Unit
Unit
setForeground(foreground: Drawable!)
Unit
Unit
Unit
Unit
Unit
setHandwritingBoundsOffsets(
    offsetLeft: Float,
    offsetTop: Float,
    offsetRight: Float,
    offsetBottom: Float
)
Unit
Unit
setHapticFeedbackEnabled(hapticFeedbackEnabled: Boolean)
Unit
setHasTransientState(hasTransientState: Boolean)
Unit
setHorizontalFadingEdgeEnabled(horizontalFadingEdgeEnabled: Boolean)
Unit
setHorizontalScrollBarEnabled(horizontalScrollBarEnabled: Boolean)
Unit
Unit
Unit
setHovered(hovered: Boolean)
Unit
setId(id: Int)
Unit
Unit
Unit
Unit
setIsCredential(isCredential: Boolean)
Unit
setIsHandwritingDelegate(isHandwritingDelegate: Boolean)
Unit
setKeepScreenOn(keepScreenOn: Boolean)
Unit
Unit
Unit
Unit
setLayerType(layerType: Int, paint: Paint!)
Unit
setLayoutDirection(layoutDirection: Int)
Unit
Unit
setLeft(left: Int)
Unit
setLeftTopRightBottom(left: Int, top: Int, right: Int, bottom: Int)
Unit
setLongClickable(longClickable: Boolean)
Unit
setMeasuredDimension(measuredWidth: Int, measuredHeight: Int)
Unit
setMinimumHeight(minHeight: Int)
Unit
setMinimumWidth(minWidth: Int)
Unit
Unit
setNextClusterForwardId(nextClusterForwardId: Int)
Unit
setNextFocusDownId(nextFocusDownId: Int)
Unit
setNextFocusForwardId(nextFocusForwardId: Int)
Unit
setNextFocusLeftId(nextFocusLeftId: Int)
Unit
setNextFocusRightId(nextFocusRightId: Int)
Unit
setNextFocusUpId(nextFocusUpId: Int)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
setOnReceiveContentListener(
    mimeTypes: Array<String!>!,
    listener: OnReceiveContentListener!
)
Unit
Unit

This function is deprecated.

Unit
Unit
Unit
Unit
Unit
setOverScrollMode(overScrollMode: Int)
Unit
setPadding(left: Int, top: Int, right: Int, bottom: Int)
Unit
setPaddingRelative(start: Int, top: Int, end: Int, bottom: Int)
Unit
setPivotX(pivotX: Float)
Unit
setPivotY(pivotY: Float)
Unit
setPointerIcon(pointerIcon: PointerIcon!)
Unit
setPreferKeepClear(preferKeepClear: Boolean)
Unit
Unit
setPressed(pressed: Boolean)
Unit
setRenderEffect(renderEffect: RenderEffect!)
Unit
setRevealOnFocusHint(revealOnFocus: Boolean)
Unit
setRight(right: Int)
Unit
setRotation(rotation: Float)
Unit
setRotationX(rotationX: Float)
Unit
setRotationY(rotationY: Float)
Unit
Unit
Unit
setScaleX(scaleX: Float)
Unit
setScaleY(scaleY: Float)
Unit
setScreenReaderFocusable(screenReaderFocusable: Boolean)
Unit
setScrollBarDefaultDelayBeforeFade(
    scrollBarDefaultDelayBeforeFade: Int
)
Unit
setScrollBarFadeDuration(scrollBarFadeDuration: Int)
Unit
setScrollBarSize(scrollBarSize: Int)
Unit
Unit
Unit
Unit
setScrollContainer(isScrollContainer: Boolean)
Unit
setScrollIndicators(indicators: Int)
Unit
setScrollX(value: Int)
Unit
setScrollY(value: Int)
Unit
Unit
setSelected(selected: Boolean)
Unit
setSoundEffectsEnabled(soundEffectsEnabled: Boolean)
Unit
setStateDescription(stateDescription: CharSequence!)
Unit
Unit
Unit

This function is deprecated.

Unit
setTag(tag: Any!)
Unit
setTextAlignment(textAlignment: Int)
Unit
setTextDirection(textDirection: Int)
Unit
Unit
setTop(top: Int)
Unit
Unit
Unit
setTransitionName(transitionName: String!)
Unit
Unit
setTranslationX(translationX: Float)
Unit
setTranslationY(translationY: Float)
Unit
setTranslationZ(translationZ: Float)
Unit
setVerticalFadingEdgeEnabled(verticalFadingEdgeEnabled: Boolean)
Unit
setVerticalScrollBarEnabled(verticalScrollBarEnabled: Boolean)
Unit
Unit
Unit
Unit
Unit
setVisibility(visibility: Int)
Unit
setWillNotCacheDrawing(willNotCacheDrawing: Boolean)

This function is deprecated.

Unit
setWillNotDraw(willNotDraw: Boolean)
Unit
Unit
setX(x: Float)
Unit
setY(y: Float)
Unit
setZ(z: Float)
Boolean
ActionMode!
Unit
Boolean
startDrag(
    data: ClipData!,
    shadowBuilder: View.DragShadowBuilder!,
    myLocalState: Any!,
    flags: Int
)

This function is deprecated.

Boolean
startDragAndDrop(
    data: ClipData!,
    shadowBuilder: View.DragShadowBuilder!,
    myLocalState: Any!,
    flags: Int
)
Boolean
Unit
String!
Unit
Unit
Unit
Unit
Boolean
Boolean

This function is deprecated.

Boolean

Public constructors

CurvedTextView

Added in 1.2.0
CurvedTextView(context: Context)

CurvedTextView

Added in 1.2.0
CurvedTextView(context: Context, attrs: AttributeSet?)

CurvedTextView

Added in 1.2.0
CurvedTextView(context: Context, attrs: AttributeSet?, defStyle: Int)

CurvedTextView

Added in 1.2.0
CurvedTextView(
    context: Context,
    attrs: AttributeSet?,
    defStyle: Int,
    defStyleRes: Int
)

Public functions

checkInvalidAttributeAsChild

Added in 1.4.0-alpha01
fun checkInvalidAttributeAsChild(): Unit
Throws
java.lang.IllegalArgumentException

if the anchorType and/or anchorAngleDegrees attributes were set for a widget in ArcLayout

draw

fun draw(canvas: Canvas): Unit

getAnchorAngleDegrees

Added in 1.2.0
fun getAnchorAngleDegrees(): @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float

Returns the anchor angle used for positioning the text, in degrees.

getAnchorType

Added in 1.2.0
fun getAnchorType(): Int

Returns the anchor type for positioning the curved text

getEllipsize

Added in 1.2.0
fun getEllipsize(): TextUtils.TruncateAt?

Returns where, if anywhere, words that are longer than the view is wide should be ellipsized.

getFontFeatureSettings

Added in 1.2.0
fun getFontFeatureSettings(): String?

Returns the font feature settings. The format is the same as the CSS font-feature-settings attribute: https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop

Returns
String?

The currently set font feature settings. Default is null.

getFontVariationSettings

Added in 1.2.0
fun getFontVariationSettings(): String?

Returns TrueType or OpenType font variation settings.

getLetterSpacing

Added in 1.2.0
fun getLetterSpacing(): Float

Gets the text letter-space value, which determines the spacing between characters. The value returned is in ems. Normally, this value is 0.0.

Returns
Float

The text letter-space value in ems.

getMaxSweepDegrees

Added in 1.2.0
fun getMaxSweepDegrees(): @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float

Returns the maximum sweep angle in degrees for rendering the text

getMinSweepDegrees

Added in 1.2.0
fun getMinSweepDegrees(): @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float

Returns the sweep angle in degrees for rendering the text

getSweepAngleDegrees

Added in 1.4.0-alpha01
fun getSweepAngleDegrees(): @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float

Returns the sweep angle that this widget is drawn with.

getText

Added in 1.2.0
fun getText(): String?

Returns the text to be rendered

getTextColor

Added in 1.2.0
fun getTextColor(): @ColorInt Int

Returns the color for rendering the text

getTextSize

Added in 1.2.0
fun getTextSize(): Float

Returns the text size for rendering the text

getThickness

Added in 1.4.0-alpha01
fun getThickness(): @Px Int

Returns the thickness of this widget inside the arc.

getTypeface

Added in 1.2.0
fun getTypeface(): Typeface?

Gets the current Typeface that is used to style the text.

isClockwise

Added in 1.2.0
fun isClockwise(): Boolean

Returns the curved text layout direction

isPointInsideClickArea

Added in 1.4.0-alpha01
fun isPointInsideClickArea(x: Float, y: Float): Boolean

See isPointInsideClickArea

onInitializeAccessibilityNodeInfo

fun onInitializeAccessibilityNodeInfo(info: AccessibilityNodeInfo): Unit

onPopulateAccessibilityEvent

fun onPopulateAccessibilityEvent(event: AccessibilityEvent): Unit

onTouchEvent

fun onTouchEvent(event: MotionEvent): Boolean

setAnchorAngleDegrees

Added in 1.2.0
fun setAnchorAngleDegrees(
    value: @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float
): Unit

Sets the anchor angle used for positioning the text, in degrees.

setAnchorType

Added in 1.2.0
fun setAnchorType(value: Int): Unit

Sets the anchor type for positioning the curved text.

Parameters
value: Int

the anchor type, one of {ANCHOR_START, ANCHOR_CENTER, ANCHOR_END}

setClockwise

Added in 1.2.0
fun setClockwise(value: Boolean): Unit

Sets the curved text layout direction

setEllipsize

Added in 1.2.0
fun setEllipsize(value: TextUtils.TruncateAt?): Unit

Causes words in the text that are longer than the view's width to be ellipsized. Use null to turn off ellipsizing.

setFontFeatureSettings

Added in 1.2.0
fun setFontFeatureSettings(value: String?): Unit

Sets font feature settings. The format is the same as the CSS font-feature-settings attribute: https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop

Parameters
value: String?

Font feature settings represented as CSS compatible string. This value may be null.

setFontVariationSettings

Added in 1.2.0
fun setFontVariationSettings(value: String?): Unit

Sets TrueType or OpenType font variation settings.

Parameters
value: String?

Font variation settings. You can pass null or empty string as no variation settings. This value may be null

setLetterSpacing

Added in 1.2.0
fun setLetterSpacing(value: Float): Unit

Sets text letter-spacing in ems. Typical values for slight expansion will be around 0.05. Negative values tighten text.

Parameters
value: Float

A text letter-space value in ems.

setSweepAngleDegrees

fun setSweepAngleDegrees(
    angleDegrees: @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float
): Unit

Set the sweep angle that this widget is drawn with. This is only called during layout, and only if the mWeight is non-zero. Note your widget will need to handle alignment.

setSweepRangeDegrees

Added in 1.2.0
fun setSweepRangeDegrees(
    minSweep: @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float,
    maxSweep: @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float
): Unit

Sets the minimum and maximum sweep angle in degrees for rendering the text.

Parameters
minSweep: @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float

Ensure the text takes at least this angle (in degrees) in the arc. Use 0f if you don't want to specify a minimum.

maxSweep: @FloatRange(from = 0.0, to = 360.0, toInclusive = true) Float

Limit the maximum angle (in degrees) that this curved text can take. Use 360f if you don't want to specify a maximum.

setText

Added in 1.2.0
fun setText(value: String?): Unit

Sets the text to be rendered

setTextColor

Added in 1.2.0
fun setTextColor(value: @ColorInt Int): Unit

Sets the color for rendering the text

setTextSize

Added in 1.2.0
fun setTextSize(value: Float): Unit

Sets the text size for rendering the text

setTypeface

Added in 1.2.0
fun setTypeface(value: Typeface?): Unit

Sets the typeface and style in which the text should be displayed. Note that not all Typeface families actually have bold and italic variants

setTypeface

Added in 1.2.0
fun setTypeface(tf: Typeface?, style: Int): Unit

Sets the typeface and style in which the text should be displayed, and turns on the fake bold and italic bits in the Paint if the Typeface that you provided does not have all the bits in the style that you specified.

Protected functions

onDraw

protected fun onDraw(canvas: Canvas): Unit

onMeasure

protected fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int): Unit

onSizeChanged

protected fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int): Unit