Lines Matching refs:rating

24  * A class to encapsulate rating information used as content metadata.
25 * A rating is defined by its rating style (see {@link #RATING_HEART},
27 * {@link #RATING_5_STARS} or {@link #RATING_PERCENTAGE}) and the actual rating value (which may
28 * be defined as "unrated"), both of which are defined when the rating instance is constructed
35 * Indicates a rating style is not supported. A Rating will never have this
42 * A rating style with a single degree of rating, "heart" vs "no heart". Can be used to
48 * A rating style for "thumb up" vs "thumb down".
53 * A rating style with 0 to 3 stars.
58 * A rating style with 0 to 4 stars.
63 * A rating style with 0 to 5 stars.
68 * A rating style expressed as a percentage.
78 private Rating(int ratingStyle, float rating) {
80 mRatingValue = rating;
85 return "Rating:style=" + mRatingStyle + " rating="
119 * Return a Rating instance with no rating.
120 * Create and return a new Rating instance with no rating known for the given
121 * rating style.
125 * @return null if an invalid rating style is passed, a new Rating instance otherwise.
142 * Return a Rating instance with a heart-based rating.
143 * Create and return a new Rating instance with a rating style of {@link #RATING_HEART},
144 * and a heart-based rating.
145 * @param hasHeart true for a "heart selected" rating, false for "heart unselected".
153 * Return a Rating instance with a thumb-based rating.
155 * rating style, and a "thumb up" or "thumb down" rating.
156 * @param thumbIsUp true for a "thumb up" rating, false for "thumb down".
164 * Return a Rating instance with a star-based rating.
165 * Create and return a new Rating instance with one of the star-base rating styles
167 * be used to represent an average rating value, which might not be an integer number of stars.
171 * the rating style.
172 * @return null if the rating style is invalid, or the rating is out of range,
188 Log.e(TAG, "Invalid rating style (" + starRatingStyle + ") for a star rating");
192 Log.e(TAG, "Trying to set out of range star-based rating");
199 * Return a Rating instance with a percentage-based rating.
201 * rating style, and a rating of the given percentage.
202 * @param percent the value of the rating
203 * @return null if the rating is out of range, a new Rating instance otherwise.
207 Log.e(TAG, "Invalid percentage-based rating value");
215 * Return whether there is a rating value available.
223 * Return the rating style.
233 * Return whether the rating is "heart selected".
234 * @return true if the rating is "heart selected", false if the rating is "heart unselected",
235 * if the rating style is not {@link #RATING_HEART} or if it is unrated.
246 * Return whether the rating is "thumb up".
247 * @return true if the rating is "thumb up", false if the rating is "thumb down",
248 * if the rating style is not {@link #RATING_THUMB_UP_DOWN} or if it is unrated.
259 * Return the star-based rating value.
260 * @return a rating value greater or equal to 0.0f, or a negative value if the rating style is
277 * Return the percentage-based rating value.
278 * @return a rating value greater or equal to 0.0f, or a negative value if the rating style is