Android Guides | Samples

Android.Media.Rating Class

A class to encapsulate rating information used as content metadata.

See Also: Rating

Syntax

[Android.Runtime.Register("android/media/Rating", DoNotGenerateAcw=true)]
public sealed class Rating : Object, IParcelable, IDisposable

Remarks

A class to encapsulate rating information used as content metadata. A rating is defined by its rating style (see Rating.RatingHeart, Rating.RatingThumbUpDown, Rating.Rating3Stars, Rating.Rating4Stars, Rating.Rating5Stars or Rating.RatingPercentage) and the actual rating value (which may be defined as "unrated"), both of which are defined when the rating instance is constructed through one of the factory methods.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0

The members of Android.Media.Rating are listed below.

See Also: Object

Public Fields

const
Rating3StarsRatingStyle (3). A rating style with 0 to 3 stars.
const
Rating4StarsRatingStyle (4). A rating style with 0 to 4 stars.
const
Rating5StarsRatingStyle (5). A rating style with 0 to 5 stars.
const
RatingHeartRatingStyle (1). A rating style with a single degree of rating, "heart" vs "no heart".
const
RatingNoneRatingStyle (0). Indicates a rating style is not supported.
const
RatingPercentageRatingStyle (6). A rating style expressed as a percentage.
const
RatingThumbUpDownRatingStyle (2). A rating style for "thumb up" vs "thumb down".

Public Properties

[read-only]
static
CreatorIParcelableCreator.
[read-only]
HasHeartBoolean. Return whether the rating is "heart selected".
[read-only]
IsRatedBoolean. Return whether there is a rating value available.
[read-only]
IsThumbUpBoolean. Return whether the rating is "thumb up".
[read-only]
PercentRatingSingle. Return the percentage-based rating value.
[read-only]
RatingStyleRatingStyle. Return the rating style.
[read-only]
StarRatingSingle. Return the star-based rating value.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

DescribeContents() : Int32
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
static
NewHeartRating(Boolean) : Rating
Return a Rating instance with a heart-based rating.
static
NewPercentageRating(Single) : Rating
Return a Rating instance with a percentage-based rating.
static
NewStarRating(RatingStyle, Single) : Rating
Return a Rating instance with a star-based rating.
static
NewThumbRating(Boolean) : Rating
Return a Rating instance with a thumb-based rating.
static
NewUnratedRating(RatingStyle) : Rating
Return a Rating instance with no rating.
WriteToParcel(Parcel, ParcelableWriteFlags)
Flatten this object in to a Parcel.