Code example for RatingBar

Methods: setStepSize

0
				ratingsBar.setRating((float)avg);
				ratingsBar.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
				public void onRatingChanged(RatingBar ratingBar, float rating,
						boolean fromUser) {
			  
						ratingsBar.setStepSize(1.0f);
			  
					} 
				}); 
			} 
			 
		} else { 
			TextView title = new TextView(ViewHappenin.this), 
			description = new TextView(ViewHappenin.this);
			TextView location = new TextView(ViewHappenin.this);
			TextView when = new TextView(ViewHappenin.this);
			TextView rating = new TextView(ViewHappenin.this);
			 
			location = (TextView)findViewById(R.id.where);
			title = (TextView)findViewById(R.id.title);
			description = (TextView)findViewById(R.id.description);