How to use Rating bar?
i would like to save the state of rat开发者_StackOverflowing bar rating stars? How would i go about doing this? and also how would i go about getting the number of stars the user has selected? To display in a textView? Thanks
From developer.android.com :
http://developer.android.com/resources/tutorials/views/hello-formstuff.html#RatingBar
Other Example Here..
http://android-er.blogspot.com/2010/02/ratingbar.html
If you want to customize RatingBar eg. Displaying other image than default Star refer How to create Custom Ratings bar in Android
This example shows Toast
message when user selects Ratings.
& Obviously you will have to customize it according to your needs (as you told you want to display it in TextView).
You can define a TextView
in xml file & set its text property when Rating has changed.
精彩评论