Rating.NewStarRating(RatingStyle, Single) Method

Definition

Return a Rating instance with a star-based rating.

[Android.Runtime.Register("newStarRating", "(IF)Landroid/media/Rating;", "")]
public static Android.Media.Rating? NewStarRating (Android.Media.RatingStyle starRatingStyle, float starRating);
[<Android.Runtime.Register("newStarRating", "(IF)Landroid/media/Rating;", "")>]
static member NewStarRating : Android.Media.RatingStyle * single -> Android.Media.Rating

Parameters

starRatingStyle
RatingStyle

one of #RATING_3_STARS, #RATING_4_STARS, #RATING_5_STARS.

starRating
Single

a number ranging from 0.0f to 3.0f, 4.0f or 5.0f according to the rating style.

Returns

Rating

null if the rating style is invalid, or the rating is out of range, a new Rating instance otherwise.

Attributes

Remarks

Java documentation for android.media.Rating.newStarRating(int, float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to