public final class ThumbRating extends Rating


A rating expressed as "thumbs up" or "thumbs down".

Summary

Public fields

final boolean

Public constructors

Creates a unrated instance.

ThumbRating(boolean isThumbsUp)

Creates a rated instance.

Public methods

boolean
static ThumbRating

Restores a ThumbRating from a Bundle.

int
boolean

Whether the rating exists or not.

boolean

Returns whether the rating is "thumbs up".

Bundle

Returns a Bundle representing the information stored in this rating.

Inherited methods

From androidx.media3.common.Rating
static Rating

Restores a Rating from a Bundle.

Public fields

isThumbsUp

public final boolean isThumbsUp

Public constructors

ThumbRating

public ThumbRating()

Creates a unrated instance.

ThumbRating

public ThumbRating(boolean isThumbsUp)

Creates a rated instance.

Parameters
boolean isThumbsUp

true for "thumbs up", false for "thumbs down".

Public methods

equals

public boolean equals(@Nullable Object obj)

fromBundle

@UnstableApi
public static ThumbRating fromBundle(Bundle bundle)

Restores a ThumbRating from a Bundle.

hashCode

public int hashCode()

isRated

public boolean isRated()

Whether the rating exists or not.

isThumbsUp

public boolean isThumbsUp()

Returns whether the rating is "thumbs up".

toBundle

@UnstableApi
public Bundle toBundle()

Returns a Bundle representing the information stored in this rating.