williamyyu / SimpleRatingBar

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

希望将srb_starPadding与View的padding分开 #82

Open LeeIGitHub opened 4 years ago

LeeIGitHub commented 4 years ago

目前的srb_starPadding一旦设置,第一颗行星的左边和上面也会加上padding

不知道我的理解对不对,应该是下面这段代码负责,我尝试重写,但却失败了

(com.willy.ratingbar.BaseRatingBar) @Override public void setStarPadding(int ratingPadding) { if (ratingPadding < 0) { return; }

    mPadding = ratingPadding;

    for (PartialView partialView : mPartialViews) {
        partialView.setPadding(mPadding, mPadding, mPadding, mPadding);
    }
}