public final class ComplicationStyle


Defines attributes to customize appearance of rendered [ ].

use Watch Face Format instead

Summary

Constants

static final @Px int

This field is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

static final int

This field is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

static final int

This field is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

static final int

This field is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public constructors

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public methods

final @ColorInt int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final Drawable

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @ColorInt int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @Px int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @Px int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @Px int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @Px int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @ColorInt int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @ColorInt int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final ColorFilter

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @ColorInt int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @Px int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @ColorInt int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @ColorInt int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @Px int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @NonNull Typeface

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @ColorInt int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @Px int

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @NonNull Typeface

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setBackgroundColor(@ColorInt int backgroundColor)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setBackgroundDrawable(Drawable backgroundDrawable)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setBorderColor(int borderColor)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setBorderDashGap(int borderDashGap)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setBorderDashWidth(int borderDashWidth)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setBorderRadius(int borderRadius)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setBorderStyle(int borderStyle)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setBorderWidth(int borderWidth)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setHighlightColor(int highlightColor)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setIconColor(int iconColor)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setImageColorFilter(ColorFilter imageColorFilter)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setRangedValuePrimaryColor(int rangedValuePrimaryColor)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setRangedValueRingWidth(int rangedValueRingWidth)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setRangedValueSecondaryColor(int rangedValueSecondaryColor)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setTextColor(@ColorInt int textColor)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setTextSize(int textSize)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setTitleColor(@ColorInt int titleColor)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
setTitleSize(int titleSize)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Constants

BORDER_RADIUS_DEFAULT

public static final @Px int BORDER_RADIUS_DEFAULT

Default border radius.

BORDER_STYLE_DASHED

public static final int BORDER_STYLE_DASHED = 2

Style where the borders are drawn as dashed lines. If this is set as current border style, dash width and dash gap should also be set via .setBorderDashWidth, .setBorderDashGap or XML attributes, or default values will be used.

BORDER_STYLE_NONE

public static final int BORDER_STYLE_NONE = 0

Style where the borders are not drawn.

BORDER_STYLE_SOLID

public static final int BORDER_STYLE_SOLID = 1

Style where the borders are drawn without any gap.

Public constructors

ComplicationStyle

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public ComplicationStyle()

ComplicationStyle

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public ComplicationStyle(@NonNull ComplicationStyle style)

Public methods

getBackgroundColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @ColorInt int getBackgroundColor()

The background color to be used.

getBackgroundDrawable

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final Drawable getBackgroundDrawable()

The background drawable to be used, or null if there's no background drawable.

getBorderColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @ColorInt int getBorderColor()

The color to render the complication border with.

getBorderDashGap

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @Px int getBorderDashGap()

The dash gap to be used when drawing borders of type .BORDER_STYLE_DASHED.

getBorderDashWidth

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @Px int getBorderDashWidth()

The dash width to be used when drawing borders of type .BORDER_STYLE_DASHED.

getBorderRadius

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @Px int getBorderRadius()

The border radius to be applied to the corners of the bounds of the complication in active mode. Border radius will be limited to the half of width or height, depending on which one is smaller. If ComplicationStyle.BORDER_RADIUS_DEFAULT is returned, border radius should be reduced to half of the minimum of width or height during the rendering.

getBorderStyle

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final int getBorderStyle()

The style to render the complication border with.

getBorderWidth

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @Px int getBorderWidth()

The width to render the complication border with.

getHighlightColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @ColorInt int getHighlightColor()

The highlight color to be used when the complication is highlighted.

getIconColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @ColorInt int getIconColor()

The color for tinting icons.

getImageColorFilter

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final ColorFilter getImageColorFilter()

The color filter used in active mode when rendering large images and small images with style SmallImageType.PHOTO.

getRangedValuePrimaryColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @ColorInt int getRangedValuePrimaryColor()

The color to be used when rendering first part of ranged value indicator.

getRangedValueRingWidth

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @Px int getRangedValueRingWidth()

The ring width to be used when rendering ranged value indicator.

getRangedValueSecondaryColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @ColorInt int getRangedValueSecondaryColor()

The color to be used when rendering second part of ranged value indicator.

getTextColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @ColorInt int getTextColor()

The color to render the text with. Text color is used for rendering short text and long text fields.

getTextSize

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @Px int getTextSize()

Returns the text size to be used for short and long text fields.

getTextTypeface

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull Typeface getTextTypeface()

The typeface to be used for short and long text.

getTitleColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @ColorInt int getTitleColor()

The color to render the title with. Title color is used for rendering short title and long title fields.

getTitleSize

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @Px int getTitleSize()

The text size to be used for short and long title fields.

getTitleTypeface

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull Typeface getTitleTypeface()

The typeface to be used for short and long title.

setBackgroundColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setBackgroundColor(@ColorInt int backgroundColor)

The background color to be used.

setBackgroundDrawable

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setBackgroundDrawable(Drawable backgroundDrawable)

The background drawable to be used, or null if there's no background drawable.

setBorderColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setBorderColor(int borderColor)

The color to render the complication border with.

setBorderDashGap

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setBorderDashGap(int borderDashGap)

The dash gap to be used when drawing borders of type .BORDER_STYLE_DASHED.

setBorderDashWidth

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setBorderDashWidth(int borderDashWidth)

The dash width to be used when drawing borders of type .BORDER_STYLE_DASHED.

setBorderRadius

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setBorderRadius(int borderRadius)

The border radius to be applied to the corners of the bounds of the complication in active mode. Border radius will be limited to the half of width or height, depending on which one is smaller. If ComplicationStyle.BORDER_RADIUS_DEFAULT is returned, border radius should be reduced to half of the minimum of width or height during the rendering.

setBorderStyle

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setBorderStyle(int borderStyle)

The style to render the complication border with.

setBorderWidth

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setBorderWidth(int borderWidth)

The width to render the complication border with.

setHighlightColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setHighlightColor(int highlightColor)

The highlight color to be used when the complication is highlighted.

setIconColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setIconColor(int iconColor)

The color for tinting icons.

setImageColorFilter

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setImageColorFilter(ColorFilter imageColorFilter)

The color filter used in active mode when rendering large images and small images with style SmallImageType.PHOTO.

setRangedValuePrimaryColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setRangedValuePrimaryColor(int rangedValuePrimaryColor)

The color to be used when rendering first part of ranged value indicator.

setRangedValueRingWidth

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setRangedValueRingWidth(int rangedValueRingWidth)

The ring width to be used when rendering ranged value indicator.

setRangedValueSecondaryColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setRangedValueSecondaryColor(int rangedValueSecondaryColor)

The color to be used when rendering second part of ranged value indicator.

setTextColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setTextColor(@ColorInt int textColor)

The color to render the text with. Text color is used for rendering short text and long text fields.

setTextSize

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setTextSize(int textSize)

Returns the text size to be used for short and long text fields.

setTextTypeface

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setTextTypeface(@NonNull Typeface textTypeface)

Sets Typeface to use when rendering short text and long text fields.

Parameters
@NonNull Typeface textTypeface

The Typeface to render the text with

setTitleColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setTitleColor(@ColorInt int titleColor)

The color to render the title with. Title color is used for rendering short title and long title fields.

setTitleSize

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setTitleSize(int titleSize)

The text size to be used for short and long title fields.

setTitleTypeface

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void setTitleTypeface(@NonNull Typeface titleTypeface)

Sets the Typeface to render the title for short and long text with.

Parameters
@NonNull Typeface titleTypeface

The Typeface to render the title with