CurvedTextView

public class CurvedTextView
extends View implements ArcLayout.Widget

java.lang.Object
   ↳ android.view.View
     ↳ androidx.wear.widget.CurvedTextView


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

Inherited constants

Inherited fields

Public constructors

CurvedTextView(Context context)
CurvedTextView(Context context, AttributeSet attrs)
CurvedTextView(Context context, AttributeSet attrs, int defStyle)
CurvedTextView(Context context, AttributeSet attrs, int defStyle, int defStyleRes)

Public methods

void checkInvalidAttributeAsChild()

Check whether the widget contains invalid attributes as a child of ArcLayout, throwing a Exception if something is wrong.

void draw(Canvas canvas)
float getAnchorAngleDegrees()

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

int getAnchorType()

Returns the anchor type for positioning the curved text

TextUtils.TruncateAt getEllipsize()

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

String getFontFeatureSettings()

Returns the font feature settings.

String getFontVariationSettings()

Returns TrueType or OpenType font variation settings.

float getLetterSpacing()

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

float getMaxSweepDegrees()

Returns the maximum sweep angle in degrees for rendering the text

float getMinSweepDegrees()

Returns the sweep angle in degrees for rendering the text

float getSweepAngleDegrees()

Returns the sweep angle that this widget is drawn with.

String getText()

Returns the text to be rendered

int getTextColor()

Returns the color for rendering the text

float getTextSize()

Returns the text size for rendering the text

int getThickness()

Returns the thickness of this widget inside the arc.

Typeface getTypeface()

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

boolean isClockwise()

Returns the curved text layout direction

boolean isPointInsideClickArea(float x, float y)

See ArcLayout.Widget.isPointInsideClickArea(float, float)

void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)
void onPopulateAccessibilityEvent(AccessibilityEvent event)
boolean onTouchEvent(MotionEvent event)
void setAnchorAngleDegrees(float value)

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

void setAnchorType(int value)

Sets the anchor type for positioning the curved text.

void setClockwise(boolean value)

Sets the curved text layout direction

void setEllipsize(TextUtils.TruncateAt value)

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

void setFontFeatureSettings(String value)

Sets font feature settings.

void setFontVariationSettings(String value)

Sets TrueType or OpenType font variation settings.

void setLetterSpacing(float value)

Sets text letter-spacing in ems.

void setSweepRangeDegrees(float minSweep, float maxSweep)

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

void setText(String value)

Sets the text to be rendered

void setTextColor(int value)

Sets the color for rendering the text

void setTextSize(float value)

Sets the text size for rendering the text

void setTypeface(Typeface tf, int style)

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.

void setTypeface(Typeface value)

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

Protected methods

void onDraw(Canvas canvas)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
void onSizeChanged(int w, int h, int oldw, int oldh)

Inherited methods