Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.

HeartRating

class HeartRating : Rating
kotlin.Any
   ↳ androidx.media2.session.HeartRating

A class for rating with a single degree of rating, "heart" vs "no heart". This can be used to indicate the content referred to is a favorite (or not).

Summary

Public constructors

Creates a unrated HeartRating instance.

<init>(hasHeart: Boolean)

Creates a HeartRating instance.

Public methods
Boolean
equals(other: Any?)

Boolean

Returns whether the rating is "heart selected".

Int

Boolean

String

Public constructors

<init>

HeartRating()

Creates a unrated HeartRating instance.

<init>

HeartRating(hasHeart: Boolean)

Creates a HeartRating instance.

Parameters
hasHeart Boolean: true for a "heart selected" rating, false for "heart unselected".

Public methods

equals

fun equals(other: Any?): Boolean

hasHeart

fun hasHeart(): Boolean

Returns whether the rating is "heart selected".

Return
Boolean true if the rating is "heart selected", false if the rating is "heart unselected", or if it is unrated.

hashCode

fun hashCode(): Int

isRated

fun isRated(): Boolean

toString

fun toString(): String