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 | |
|---|---|
FixedText(value: CharSequence)Creates a |
|
FixedText(value: CharSequence, unit: CharSequence?)Creates a |
|
| Public methods | |
|---|---|
| Boolean | |
| CharSequence? |
getUnit()A unit for the value. |
| CharSequence |
getValue()The text value. |
| Int |
hashCode() |
| String |
toString() |
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
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