Home | History | Annotate | Download | only in widget

Lines Matching defs:rating

29  * A RatingBar is an extension of SeekBar and ProgressBar that shows a rating in
30 * stars. The user can touch/drag or use arrow keys to set the rating when using
54 * A callback that notifies clients when the rating has been changed. This
62 * Notification that the rating has changed. Clients can use the
65 * while the user is dragging, only when the user finalizes a rating by
68 * @param ratingBar The RatingBar whose rating has changed.
69 * @param rating The current rating. This will be in the range
71 * @param fromUser True if the rating change was initiated by a user's
74 void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser);
95 final float rating = a.getFloat(R.styleable.RatingBar_rating, -1);
109 if (rating >= 0) {
110 setRating(rating);
127 * Sets the listener to be called when the rating changes.
136 * @return The listener (may be null) that is listening for rating change
144 * Whether this rating bar should only be an indicator (thus non-changeable
161 * @return Whether this rating bar is only an indicator.
196 * Sets the rating (the number of stars filled).
198 * @param rating The rating to set.
200 public void setRating(float rating) {
201 setProgress(Math.round(rating * getProgressPerStar()));
205 * Gets the current rating (number of stars filled).
207 * @return The current rating.
214 * Sets the step size (granularity) of this rating bar.
216 * @param stepSize The step size of this rating bar. For example, if
231 * Gets the step size of this rating bar.
264 // Callback for non-user rating changes