The second Android 11 Developer Preview is now available, test it out and share your feedback.

ThumbRating

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

A class for rating with a single degree of rating, "thumb up" vs "thumb down".

Summary

Public constructors

Creates a unrated ThumbRating instance.

<init>(thumbIsUp: Boolean)

Creates a ThumbRating instance.

Public methods

Boolean
equals(other: Any?)

Int

Boolean

Boolean

Returns whether the rating is "thumb up".

String

Public constructors

<init>

ThumbRating()

Creates a unrated ThumbRating instance.

<init>

ThumbRating(thumbIsUp: Boolean)

Creates a ThumbRating instance.

Parameters
thumbIsUp Boolean: true for a "thumb up" rating, false for "thumb down".

Public methods

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

isRated

fun isRated(): Boolean

isThumbUp

fun isThumbUp(): Boolean

Returns whether the rating is "thumb up".

Return
Boolean true if the rating is "thumb up", false if the rating is "thumb down", or if it is unrated.

toString

fun toString(): String