You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are tutorials available for how to make a star rating UI component, but I'm really hoping to do something a little more complicated, and I think it's going to require handling the rating as a slider (with an invisible knob).
My idea is that the "bar" will be a row of five stars and then sliding along it results in this:
0.0 = "star" x 5
0.5 = ("star.leadinghalf.fill" x 1) + ("star" x 4)
1.0 = ("star.fill" x 1) + ("star" x 4)
1.5 = ("star.fill" x 1) + ("star.leadinghalf.fill" x 1) + ("star" x 3)
.. and so forth up to ("star.fill" x 5)
I've tried altering your sliders to do something like this, and clearly I did it wrong because any attempt to "slide" along the row resulted in the row of stars changing position on the screen.
Is this something that should be handled as a slider, or should I instead perhaps handle it so that each star is a button that starts at "star (empty)" and changes to "star.leadinghalf.fill" the first time it's tapped, and then to "star.fill" if it's tapped again, before cycling back to being empty?
The text was updated successfully, but these errors were encountered:
There are tutorials available for how to make a star rating UI component, but I'm really hoping to do something a little more complicated, and I think it's going to require handling the rating as a slider (with an invisible knob).
My idea is that the "bar" will be a row of five stars and then sliding along it results in this:
0.0 = "star" x 5
0.5 = ("star.leadinghalf.fill" x 1) + ("star" x 4)
1.0 = ("star.fill" x 1) + ("star" x 4)
1.5 = ("star.fill" x 1) + ("star.leadinghalf.fill" x 1) + ("star" x 3)
.. and so forth up to ("star.fill" x 5)
I've tried altering your sliders to do something like this, and clearly I did it wrong because any attempt to "slide" along the row resulted in the row of stars changing position on the screen.
Is this something that should be handled as a slider, or should I instead perhaps handle it so that each star is a button that starts at "star (empty)" and changes to "star.leadinghalf.fill" the first time it's tapped, and then to "star.fill" if it's tapped again, before cycling back to being empty?
The text was updated successfully, but these errors were encountered: