public abstract class Rating implements Bundleable

Known direct subclasses
HeartRating

A rating expressed as "heart" or "no heart".

PercentageRating

A rating expressed as a percentage.

StarRating

A rating expressed as a fractional number of stars.

ThumbRating

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


A rating for media content. The style of a rating can be one of HeartRating, , StarRating, or ThumbRating.

Summary

Constants

static final Bundleable.Creator<Rating>

This field is deprecated.

Use fromBundle instead.

Public methods

static Rating

Restores a Rating from a Bundle.

abstract boolean

Whether the rating exists or not.

Inherited methods

From androidx.media3.common.Bundleable
abstract Bundle

Returns a Bundle representing the information stored in this object.

Constants

CREATOR

@UnstableApi
public static final Bundleable.Creator<RatingCREATOR

Object that can restore a Rating from a Bundle.

Public methods

fromBundle

@UnstableApi
public static Rating fromBundle(Bundle bundle)

Restores a Rating from a Bundle.

isRated

public abstract boolean isRated()

Whether the rating exists or not.