Android Custom View 102 (Part 9)
A RatingBar Example
There is nothing new here, just another exercise.
Two things to be careful with:
- Try to call
validate()as fewer times as possible, it is expensive. - If you want to handle the touch events in this manner, remember to return
truefromonTouchEvent(). Otherwise, only the first event will be triggered(most likely DOWN in this case) and not the succeeding ones (like the MOVES).
Share this post
Twitter
Google+
Facebook
Reddit
LinkedIn
StumbleUpon
Email