RatingBar - Toggle or Disable

Background: We use the standard Android RatingBar with 5 stars. We allow users to rate the use of this RatingBar from 1 to 5. By default, we display a value of zero that is not evaluated.

Problem: The user is currently unable to cancel or set the rating to zero after he clicks on the rating panel even once. They can make this the smallest value, which is 1. It is impossible to do even in the code, because the onRatingChange event is not raised if you click the same rating more than once.

Any thoughts on how to overcome this, and is this possible? Will there be a new subclass using RatingBar in this case?

Thanks in advance.

Update: The question has no code, as it does not relate to problems in the code. This is a question about the functionality and limitations of RatingBar.

+4
source share
1 answer

To unleash the Android RatingBar , the user must move left at the end of the RatingBar . Just clicking on the last star will not be canceled.

+7
source

Source: https://habr.com/ru/post/1444997/


All Articles