eugeneek/SmileBar

setRating not working proper

Closed this issue · 1 comments

I need to change rating runtime.

For example user removing rating and setting it to 0 i want to make it 1.

For that i used below code.

rbFood.setOnRatingSliderChangeListener(new SmileBar.OnRatingSliderChangeListener() {
            @Override
            public void onPendingRating(int rating) {

            }

            @Override
            public void onFinalRating(int rating) {
                if(rating == 0){
                    rbFood.setRating(1);
                }
            }

            @Override
            public void onCancelRating() {
                rbFood.setRating(rbFood.getRating());
            }
        });

but setRating is not reflecting many time.

Can't reproduce this issue. Your code works fine with me. Please create a sample project that reproduced this issue and share with me.