ColorChooserDialog.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:GitHub 作者:
@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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号