NotificationCompat.Metric.FixedText


public final class NotificationCompat.Metric.FixedText extends NotificationCompat.Metric.MetricValue


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
@Nullable CharSequence

A unit for the value.

@NonNull CharSequence

The text value.

int
@NonNull String

Public constructors

FixedText

public FixedText(@NonNull CharSequence value)

Creates a FixedText instance with the specified text.

FixedText

public FixedText(@NonNull CharSequence value, @Nullable CharSequence unit)

Creates a FixedText instance with the specified text.

Parameters
@NonNull CharSequence value

text value

@Nullable CharSequence unit

optional unit for the value. Limit this to a few characters.

Public methods

equals

public boolean equals(Object obj)

getUnit

public @Nullable CharSequence getUnit()

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.

getValue

public @NonNull CharSequence getValue()

The text value.

hashCode

public int hashCode()

toString

public @NonNull String toString()