Android 12 Developer Preview is here! Try it out, and give us your feedback!

WearCurvedTextView

open class WearCurvedTextView : View, WearArcLayout.ArcLayoutWidget
kotlin.Any
   ↳ android.view.View
   ↳ androidx.wear.widget.WearCurvedTextView

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

Summary

Public constructors
<init>(@NonNull context: Context)

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?)

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?, defStyle: Int)

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?, defStyle: Int, defStyleRes: Int)

Public methods
open Unit

open Unit
draw(@NonNull canvas: Canvas)

open Float

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

open Int

returns the anchor type for positioning the curved text

open Boolean

returns the curved text layout direction

open TruncateAt?

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

open String?

Returns the font feature settings.

open String?

Returns TrueType or OpenType font variation settings.

open Float

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

open Float

returns the maximum sweep angle in degrees for rendering the text

open Float

returns the sweep angle in degrees for rendering the text

open Float

open String?

returns the text to be rendered

open Int

returns the color for rendering the text

open Float

returns the text size for rendering the text

open Int

open Typeface?

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

open Boolean

open Boolean
onTouchEvent(@NonNull event: MotionEvent)

open Unit

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

open Unit

Sets the anchor type for positioning the curved text.

open Unit

sets the curved text layout direction

open Unit
setEllipsize(@Nullable value: TruncateAt?)

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

open Unit
setFontFeatureSettings(@Nullable value: String?)

Sets font feature settings.

open Unit
setFontVariationSettings(@Nullable value: String?)

Sets TrueType or OpenType font variation settings.

open Unit

Sets text letter-spacing in ems.

open Unit

sets the maximum sweep angle in degrees for rendering the text

open Unit

sets the sweep angle in degrees for rendering the text

open Unit
setText(@Nullable value: String