Android7.0中文API -- RatingBar

xiaoxiao2021-02-28  91

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/RatingBar.html

RatingBar

public class RatingBar extends AbsSeekBar

java.lang.Object   ↳android.view.View    ↳android.widget.ProgressBar     ↳android.widget.AbsSeekBar      ↳android.widget.RatingBar 已知的直接子类 AppCompatRatingBar

A RatingBar is an extension of SeekBar and ProgressBar that shows a rating in stars. The user can touch/drag or use arrow keys to set the rating when using the default size RatingBar. The smaller RatingBar style ( ratingBarStyleSmall) and the larger indicator-only style (ratingBarStyleIndicator) do not support user interaction and should only be used as indicators. RatingBar是SeekBar和ProgressBar的扩展,它显示了以星的形式表示的评级。当使用默认大小的RatingBar时,用户可以通过触摸,拖动或使用箭头按键,开设置评级较小的RatingBar的样式(ratingBarStyleSmall)和较大的指示器样式(ratingBarStyleIndicator)不支持用户交互,应只作为指示器使用。

When using a RatingBar that supports user interaction, placing widgets to the left or right of the RatingBar is discouraged. 当使用一个支持用户交互的RatingBar时,不建议在RatingBar的左边或右边放置控件。

The number of stars set (via setNumStars(int) or in an XML layout) will be shown when the layout width is set to wrap content (if another layout width is set, the results may be unpredictable). 当布局宽度设置为WRAP_CONTENT时(如果设置了另一个布局宽度,结果可能是不可预测的),设置的星星数(通过setNumStars(int)或在一个XML布局中)将被显示。

The secondary progress should not be modified by the client as it is used internally as the background for a fractionally filled star. 次要的进展不应该被使用者告别,因为它用于内部的一个小星星的背景。

摘要


嵌套类

interfaceRatingBar.OnRatingBarChangeListener

A callback that notifies clients when the rating has been changed.  一个回调,当评级已发生改变时,通知RatingBar的使用者。 

XML属性

android:isIndicator此RatingBar是否是一个指示器(用户无法进行更改)。 android:numStars要显示的星数 (或评级项)。 android:rating默认评级值。 android:stepSize评级的步长。 

继承XML属性

From class android.widget.AbsSeekBar From class android.widget.ProgressBar From class android.view.View

继承常量

From class android.view.View

继承字段

From class android.view.View

Public构造方法

RatingBar(Context context, AttributeSet attrs, int defStyleAttr) RatingBar(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) RatingBar(Context context, AttributeSet attrs) RatingBar(Context context)

Public方法

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/RatingBar.html

转载请注明原文地址: https://www.6miu.com/read-43192.html

最新回复(0)