PercentageRating


class PercentageRating : Rating


A rating expressed as a percentage.

Summary

Constants

const Bundleable.Creator<PercentageRating!>!

This property is deprecated.

Use fromBundle instead.

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 object.

Public properties

Float

Inherited Constants

From androidx.media3.common.Rating
const Bundleable.Creator<Rating!>!

This property is deprecated.

Use fromBundle instead.

Inherited functions

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

Restores a Rating from a Bundle.

Constants

CREATOR

@UnstableApi
const val CREATORBundleable.Creator<PercentageRating!>!

Object that can restore a PercentageRating 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 object.

Public properties

percent

val percentFloat