NotificationCompat.Metric.FixedInt


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


Metric corresponding to an integer value.

Summary

Public constructors

FixedInt(int value)

Creates a FixedInt instance with the specified integer value, and no unit text.

FixedInt(int value, @Nullable CharSequence unit)

Creates a FixedInt instance with the specified integer value.

Public methods

boolean
@Nullable CharSequence

A unit for the value.

int

The integer value.

int
@NonNull String

Public constructors

FixedInt

public FixedInt(int value)

Creates a FixedInt instance with the specified integer value, and no unit text.

FixedInt

public FixedInt(int value, @Nullable CharSequence unit)

Creates a FixedInt instance with the specified integer value.

Parameters
int value

integer 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 int getValue()

The integer value.

hashCode

public int hashCode()

toString

public @NonNull String toString()