Preface
This chapter is about android. widget. RatingBar. OnRatingBarChangeListener, version: Android 2.2 r1, translated from madgoat, welcome to his blog: http://madgoat.cn, thanks again madgoat! I look forward to your participation in Android API Chinese translation, contact me over140@gmail.com.
Statement
You are welcome to repost, but please keep the original source of the article :)
Blog Garden: http://www.cnblogs.com/
Android Chinese translation group: http://www.cnblogs.com/over140/
Body
I. Structure
Public static interface RatingBar. OnRatingBarChangeListener
Ii. Overview
Notify the client of the callback function when the rating level changes. This includes changes triggered by a user through gestures, direction keys, or trackballs, and changes triggered by programming.
Iii. Public Methods
Public abstract void onRatingChanged (RatingBar ratingBar, float rating, boolean fromUser)
The notification rating has been modified. The client can use the fromUser parameter to distinguish between user-triggered changes and programming-triggered changes. When you drag a user, the user will not be called continuously, but will be called only when the user finally leaves the touch to end the score.
Parameters
RatingBar
Rating current score. The value range is 0 to the number of stars.
FromUser returns true if the score change is triggered by the movement of the user's touch gesture or direction key trackball.
4. Related Articles
Android Chinese API (40) -- RatingBar