Rating

Class of android.media · Rating.java · Android's reference

public final class Rating implements Parcelable

A user's rating of a media item, in one of the rating styles.

Fields

public static final int RATING_NONE = 0 source
public static final int RATING_HEART = 1 source
public static final int RATING_THUMB_UP_DOWN = 2 source
public static final int RATING_3_STARS = 3 source
public static final int RATING_4_STARS = 4 source
public static final int RATING_5_STARS = 5 source
public static final int RATING_PERCENTAGE = 6 source
public static final Parcelable.Creator<Rating> CREATOR source

Methods

public static Rating newUnratedRating(int ratingStyle) source
public static Rating newHeartRating(boolean hasHeart) source
public static Rating newThumbRating(boolean thumbIsUp) source
public static Rating newStarRating(int starRatingStyle, float starRating) source

Null for a style that is not a star style, or a rating outside 0 to the style's number of stars.

public static Rating newPercentageRating(float percent) source
public boolean isRated() source
public int getRatingStyle() source
public boolean hasHeart() source
public boolean isThumbUp() source
public float getStarRating() source
public float getPercentRating() source
public String toString() source
public int describeContents() source
public void writeToParcel(Parcel dest, int flags) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.