We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AppCompatProgressBarHelper.loadFromAttribute(){ TypedArray array = mView.getContext().obtainStyledAttributes(attrs, ATTR, defStyleAttr, 0); if (array.hasValue(0)) { mProgressTintResId = array.getResourceId(0, 0); setSupportProgressTint(array.getColorStateList(0)); } if (array.hasValue(1)) { mIndeterminateTintResId = array.getResourceId(1, 0); setSupportIndeterminateTint(array.getColorStateList(1)); } array.recycle(); }
改成下面 AppCompatProgressBarHelper.loadFromAttribute(){ TypedArray array = mView.getContext().obtainStyledAttributes(attrs, ATTR, defStyleAttr, 0); if (array.hasValue(0)) { mProgressTintResId = array.getResourceId(0, 0); setSupportProgressTint(hemeUtil.getThemeColorStateList(mProgressTintResId)); } if (array.hasValue(1)) { mIndeterminateTintResId = array.getResourceId(1, 0); setSupportIndeterminateTint(ThemeUtil.getThemeColorStateList(mIndeterminateTintResId)); } array.recycle(); }
这样可以避免replaceColor这个方法里面替换颜色 感觉这个方法太不可靠了, 只需要replaceColorById 这个里面替换颜色id就行, id替换感觉更加可靠。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
AppCompatProgressBarHelper.loadFromAttribute(){
TypedArray array = mView.getContext().obtainStyledAttributes(attrs, ATTR, defStyleAttr, 0);
if (array.hasValue(0)) {
mProgressTintResId = array.getResourceId(0, 0);
setSupportProgressTint(array.getColorStateList(0));
}
if (array.hasValue(1)) {
mIndeterminateTintResId = array.getResourceId(1, 0);
setSupportIndeterminateTint(array.getColorStateList(1));
}
array.recycle();
}
改成下面
AppCompatProgressBarHelper.loadFromAttribute(){
TypedArray array = mView.getContext().obtainStyledAttributes(attrs, ATTR, defStyleAttr, 0);
if (array.hasValue(0)) {
mProgressTintResId = array.getResourceId(0, 0);
setSupportProgressTint(hemeUtil.getThemeColorStateList(mProgressTintResId));
}
if (array.hasValue(1)) {
mIndeterminateTintResId = array.getResourceId(1, 0);
setSupportIndeterminateTint(ThemeUtil.getThemeColorStateList(mIndeterminateTintResId));
}
array.recycle();
}
这样可以避免replaceColor这个方法里面替换颜色 感觉这个方法太不可靠了, 只需要replaceColorById 这个里面替换颜色id就行, id替换感觉更加可靠。
The text was updated successfully, but these errors were encountered: