Step size in RatingBar

前端 未结 2 1636
情深已故
情深已故 2021-01-21 08:34

What is a step size in a RatingBar? This is what I found in the documentation: The step size of this rating bar. For example, if half-star granularity is wanted, this would

2条回答
  •  盖世英雄少女心
    2021-01-21 09:09

    Its nothing but a factor by which you increase ratings on RatingBar. If you want ratings to be displayed like 3.5 or 4.5, you can use stepSize as 0.5. Incase, you want ratings like 3.1 or 4.3, you can have stepSize like 0.1.

    Inshort,

    stepSize = 1, Ratings = 0, 1, 2, 3, 4, 5, ...

    stepSize = 0.1, Ratings = 0.0, 0.1, 0.2, ..., 1.0, ..., 2.0, ..., 5.0, ...

    stepSize = 0.5, Ratings = 0.0, 0.5, 1.0, 1.5, 2.0, ..., 5.0, ...

提交回复
热议问题