PercentageRating
Artifact: androidx.media3:media3-common
class PercentageRating : Rating
A rating expressed as a percentage.
Summary
Public constructors |
|---|
|
Creates a unrated instance. |
PercentageRating(percent: @FloatRange(from = 0, to = 100) Float)Creates a rated instance with the given percentage. |
Public functions |
|
|---|---|
Boolean |
|
java-static PercentageRating! |
@UnstableApiRestores a |
Int |
hashCode() |
Boolean |
isRated()Whether the rating exists or not. |
Bundle! |
Returns a |
Inherited functions |
||
|---|---|---|
|
Public constructors
PercentageRating
PercentageRating(percent: @FloatRange(from = 0, to = 100) Float)
Creates a rated instance with the given percentage.
| Parameters | |
|---|---|
percent: @FloatRange(from = 0, to = 100) Float |
The percentage value of the rating. |
Public functions
fromBundle
@UnstableApi
java-static fun fromBundle(bundle: Bundle!): PercentageRating!
Restores a PercentageRating from a Bundle.
toBundle
@UnstableApi
fun toBundle(): Bundle!
Returns a Bundle representing the information stored in this rating.