PercentageRating


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
equals(obj: Any?)
java-static PercentageRating!

Restores a PercentageRating from a Bundle.

Int
Boolean

Whether the rating exists or not.

Bundle!

Returns a Bundle representing the information stored in this rating.

Public properties

Float

Inherited functions

From androidx.media3.common.Rating
java-static Rating!

Restores a Rating from a Bundle.

Public constructors

PercentageRating

PercentageRating()

Creates a unrated instance.

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

equals

fun equals(obj: Any?): Boolean

fromBundle

@UnstableApi
java-static fun fromBundle(bundle: Bundle!): PercentageRating!

Restores a PercentageRating from a Bundle.

hashCode

fun hashCode(): Int

isRated

fun isRated(): Boolean

Whether the rating exists or not.

toBundle

@UnstableApi
fun toBundle(): Bundle!

Returns a Bundle representing the information stored in this rating.

Public properties

percent

val percentFloat