class HeartRating : Rating


A rating expressed as "heart" or "no heart". It can be used to indicate whether the content is a favorite.

Summary

Public constructors

Creates a unrated instance.

HeartRating(isHeart: Boolean)

Creates a rated instance.

Public functions

Boolean
equals(obj: Any?)
java-static HeartRating!

Restores a HeartRating from a Bundle.

Int
Boolean

Whether the rating exists or not.

Bundle!

Returns a Bundle representing the information stored in this rating.

Public properties

Boolean

Inherited functions

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

Restores a Rating from a Bundle.

Public constructors

HeartRating

HeartRating()

Creates a unrated instance.

HeartRating

HeartRating(isHeart: Boolean)

Creates a rated instance.

Parameters
isHeart: Boolean

true for "heart", false for "no heart".

Public functions

equals

fun equals(obj: Any?): Boolean

fromBundle

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

Restores a HeartRating 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

isHeart

val isHeartBoolean