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
比如多主题的颜色。我希望能增加接口。drawable也可以替换那就很强大了 @ColorRes int getThemeColorId(Context context, int colorId, String theme) { switch (colorId) { case R.color.theme_color_primary: return context.getResources().getIdentifier(theme, "color", getPackageName()); case R.color.theme_color_primary_dark: return context.getResources().getIdentifier(theme + "_dark", "color", getPackageName()); case R.color.theme_color_primary_trans: return context.getResources().getIdentifier(theme + "_trans", "color", getPackageName());
The text was updated successfully, but these errors were encountered:
这个接口用来自定义颜色替换的规则, 想增加什么接口?
Sorry, something went wrong.
他想自定义其他资源比如图片的替换规则
No branches or pull requests
比如多主题的颜色。我希望能增加接口。drawable也可以替换那就很强大了 @ColorRes
int getThemeColorId(Context context, int colorId, String theme) {
switch (colorId) {
case R.color.theme_color_primary:
return context.getResources().getIdentifier(theme, "color", getPackageName());
case R.color.theme_color_primary_dark:
return context.getResources().getIdentifier(theme + "_dark", "color", getPackageName());
case R.color.theme_color_primary_trans:
return context.getResources().getIdentifier(theme + "_trans", "color", getPackageName());
The text was updated successfully, but these errors were encountered: