FixedText


class FixedText : Notification.Metric.MetricValue
kotlin.Any
   ↳ android.app.Notification.Metric.MetricValue
   ↳ android.app.Notification.Metric.FixedText

Metric corresponding to a text value.

Summary

Public constructors

Creates a FixedText instance with the specified text.

Creates a FixedText instance with the specified text.

Public methods
Boolean
equals(other: Any?)

CharSequence?

A unit for the value.

CharSequence

The text value.

Int

String

Public constructors

FixedText

FixedText(value: CharSequence)

Creates a FixedText instance with the specified text.

Parameters
value CharSequence: This value cannot be null.

FixedText

FixedText(
    value: CharSequence,
    unit: CharSequence?)

Creates a FixedText instance with the specified text.

Parameters
value CharSequence: This value cannot be null.
unit CharSequence?: optional unit for the value. Limit this to a few characters.
This value may be null.

Public methods

equals

fun equals(other: Any?): Boolean

getUnit

fun getUnit(): CharSequence?

A unit for the value.

This may not be shown to the user in all views.

The space allocated to this will be limited. It's recommended to limit this to just a few characters.

Return
CharSequence? This value may be null.

getValue

fun getValue(): CharSequence

The text value.

Return
CharSequence This value cannot be null.

hashCode

fun hashCode(): Int

toString

fun toString(): String