Code example for RatingBar

Methods: setOnRatingBarChangeListenersetRating

		if (fieldType != float.class && fieldType != Float.class) {
			throw new IllegalArgumentException("Views of 'RatingBar' type can only be bound to a fields of 'float' or 'Float' type.");
		// Set the model value to the view. 
		// Add a listener for changes on the view and update the model accordingly. 
		targetView.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
			public void onRatingChanged(RatingBar ratingBar, float rating,
					boolean fromUser) {
				if (!fromUser) {
				try { 
Connect your IDE to all the code out there  Get Codota for Java