RatingBar


 

  1. Static RatingBar
  2. Dynamic RatingBar
  3. RatingBar with Different Sizes/Styles
  4. RatingBar with One Touch
  5. Custom RatingBar

 

1. Static RatingBar
Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.
Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open src -> package -> MainActivity.java and add following code :

Step 4 : Open AndroidManifest.xml and add following code :

ScreenShot:

rating rating3 rating2

Download_button

 

2. Dynamic RatingBar
Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.Step 2 : Open src -> package -> MainActivity.java and add following code :

Step 3 : Open AndroidManifest.xml and add following code :

ScreenShot:

dy_rating dy_rating3 dy_rating2

Download_button

 

3. Rating with Different Sizes
Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.
Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open src -> package -> MainActivity.java and add following code :

Step 4 : Open AndroidManifest.xml and add following code :

ScreenShot:

rating_diff

Download SourceCode

 

4. RatingBar with One Touch
Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.
Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open src -> package -> MainActivity.java and add following code :

Step 4 : Open AndroidManifest.xml and add following code :

ScreenShot:

ratingbar_one2 ratingbar_one

Download SourceCode

 

5. Custom RatingBar
Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.
Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> drawable -> Create new xml, ratingbar_selector_images.xml.xml and add following code :

Step 4 : Open res -> values -> styles.xml and add following code :

Step 5 : Open src -> package -> MainActivity.java and add following code :

Step 6 : Open AndroidManifest.xml and add following code :

ScreenShot:

custom_rating custom_rating3 custom_rating2

Download SourceCode