开发者

How to use Rating bar?

开发者 https://www.devze.com 2023-03-16 22:01 出处:网络
i would like to save the state of rat开发者_StackOverflowing bar rating stars? How would i go about doing this?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号