Skip to content
New issue

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

颜色设置无效 #3

Open
V-sign opened this issue Jan 8, 2019 · 0 comments
Open

颜色设置无效 #3

V-sign opened this issue Jan 8, 2019 · 0 comments

Comments

@V-sign
Copy link

V-sign commented Jan 8, 2019

`class SpanTextClickable extends ClickableSpan {
@OverRide
public void onClick(View widget) {
if (spread) {//调用展开的方法
spread = false;
mTextView.setText(getSpannableString(mOriMsg + mTextClose));
} else {
spread = true;
mTextView.setText(compressedWithString());
}
}

    @Override
    public void updateDrawState(TextPaint ds) {
        if (mSpanTextColor == null) {
            ds.setColor(mSpanTextColor);
        } else {
            ds.setColor(ds.linkColor);
        }
        ds.setUnderlineText(false);    //去除超链接的下划线
    }
}`

if (mSpanTextColor == null) 这一行应该是判断不为空

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant