williamyyu / SimpleRatingBar

A simple RatingBar that you can easier to customize image and animations
MIT License
1.36k stars 153 forks source link

when it use in recyclerview have some problem #15

Closed senlsy closed 7 years ago

senlsy commented 7 years ago

change PartialView.class resolve public void setFilledDrawable(Drawable drawable) { //new : drawable.getConstantState().newDrawable() ClipDrawable clipDrawable = new ClipDrawable(drawable.getConstantState().newDrawable(), Gravity.LEFT, ClipDrawable.HORIZONTAL); mFilledView.setImageDrawable(clipDrawable); }

public void setEmptyDrawable(Drawable drawable) {
     //new : drawable.getConstantState().newDrawable()
    ClipDrawable clipDrawable = new ClipDrawable(drawable.getConstantState().newDrawable(), Gravity.RIGHT, ClipDrawable.HORIZONTAL);
    mEmptyView.setImageDrawable(clipDrawable);
}
gsanguinetti commented 7 years ago

I have some problems too when I use it inside a recycler view.

williamyyu commented 7 years ago

Hello @senlsy , Oh my gosh, I'm too late to see your response!!! could you tell me why this bug happened? I have find a way to resolve this problem several weeks. orz

Thank you very much for providing this solution!