@ColorInt private int getSelectedColor() {
if (colorChooserCustomFrame != null &&
colorChooserCustomFrame.getVisibility() == View.VISIBLE) {
return selectedCustomColor;
}
int color = 0;
if (subIndex() > -1)
color = mColorsSub[topIndex()][subIndex()];
else if (topIndex() > -1)
color = mColorsTop[topIndex()];
if (color == 0) {
int fallback = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
fallback = DialogUtils.resolveColor(getActivity(), android.R.attr.colorAccent);
color = DialogUtils.resolveColor(getActivity(), R.attr.colorAccent, fallback);
}
return color;
}
ColorChooserDialog.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录