Source code for tutorial : http://code2care.org/pages/custom-ratingbar-android-programming-tutorial/