Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
Added in API level 1
public static interface

RatingBar.OnRatingBarChangeListener

android.widget.RatingBar.OnRatingBarChangeListener

Class Overview

A callback that notifies clients when the rating has been changed. This includes changes that were initiated by the user through a touch gesture or arrow key/trackball as well as changes that were initiated programmatically.

Summary

Public Methods
abstract void onRatingChanged ( RatingBar ratingBar, float rating, boolean fromUser)
Notification that the rating has changed.

Public Methods

public abstract void onRatingChanged ( RatingBar ratingBar, float rating, boolean fromUser)

Added in API level 1

Notification that the rating has changed. Clients can use the fromUser parameter to distinguish user-initiated changes from those that occurred programmatically. This will not be called continuously while the user is dragging, only when the user finalizes a rating by lifting the touch.

Parameters
ratingBar The RatingBar whose rating has changed.
rating The current rating. This will be in the range 0..numStars.
fromUser True if the rating change was initiated by a user's touch gesture or arrow key/horizontal trackbell movement.