class ComplicationStyle


Defines attributes to customize appearance of rendered [ ].

use Watch Face Format instead

Summary

Constants

const @Px Int

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

const Int

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

const Int

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

const Int

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

Public constructors

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

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

Public functions

Unit
setTextTypeface(textTypeface: Typeface)

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

Unit
setTitleTypeface(titleTypeface: Typeface)

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

Public properties

@ColorInt Int

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

Drawable?

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

Int

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

Int

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

Int

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

Int

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

Int

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

Int

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

Int

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

Int

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

ColorFilter?

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

Int

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

Int

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

Int

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

@ColorInt Int

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

Int

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

Typeface

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

@ColorInt Int

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

Int

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

Typeface

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

Constants

BORDER_RADIUS_DEFAULT

const val BORDER_RADIUS_DEFAULT: @Px Int

Default border radius.

BORDER_STYLE_DASHED

const val BORDER_STYLE_DASHED = 2: Int

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

const val BORDER_STYLE_NONE = 0: Int

Style where the borders are not drawn.

BORDER_STYLE_SOLID

const val BORDER_STYLE_SOLID = 1: Int

Style where the borders are drawn without any gap.

Public constructors

ComplicationStyle

Added in 1.0.0
Deprecated in 1.3.0-alpha06
ComplicationStyle()

ComplicationStyle

Added in 1.0.0
Deprecated in 1.3.0-alpha06
ComplicationStyle(style: ComplicationStyle)

Public functions

setTextTypeface

Added in 1.0.0
Deprecated in 1.3.0-alpha06
fun setTextTypeface(textTypeface: Typeface): Unit

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

Parameters
textTypeface: Typeface

The Typeface to render the text with

setTitleTypeface

Added in 1.0.0
Deprecated in 1.3.0-alpha06
fun setTitleTypeface(titleTypeface: Typeface): Unit

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

Parameters
titleTypeface: Typeface

The Typeface to render the title with

Public properties

backgroundColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var backgroundColor: @ColorInt Int

The background color to be used.

backgroundDrawable

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var backgroundDrawableDrawable?

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

borderColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var borderColorInt

The color to render the complication border with.

borderDashGap

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var borderDashGapInt

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

borderDashWidth

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var borderDashWidthInt

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

borderRadius

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var borderRadiusInt

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.

borderStyle

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var borderStyleInt

The style to render the complication border with.

borderWidth

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var borderWidthInt

The width to render the complication border with.

highlightColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var highlightColorInt

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

iconColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var iconColorInt

The color for tinting icons.

imageColorFilter

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var imageColorFilterColorFilter?

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

rangedValuePrimaryColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var rangedValuePrimaryColorInt

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

rangedValueRingWidth

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var rangedValueRingWidthInt

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

rangedValueSecondaryColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var rangedValueSecondaryColorInt

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

textColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var textColor: @ColorInt Int

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

textSize

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var textSizeInt

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

textTypeface

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val textTypefaceTypeface

The typeface to be used for short and long text.

titleColor

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var titleColor: @ColorInt Int

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

titleSize

Added in 1.0.0
Deprecated in 1.3.0-alpha06
var titleSizeInt

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

titleTypeface

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val titleTypefaceTypeface

The typeface to be used for short and long title.