Show underline when text show a link
Hyperlinked text should have underline instead of using color only, such that color blind users are able to compare to the surrounding text. Change-Id: I7e93f76ebd40077710385e8670176e878b021ef8 Fix: 148839397 Test: visual see link in "Skip songs", "Silence interruptions", "Reach to check phone".
This commit is contained in:
@@ -74,7 +74,7 @@ public class LinkifyUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void updateDrawState(TextPaint ds) {
|
public void updateDrawState(TextPaint ds) {
|
||||||
super.updateDrawState(ds);
|
super.updateDrawState(ds);
|
||||||
ds.setUnderlineText(false);
|
ds.setUnderlineText(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
spannableContent.setSpan(spannableLink, beginIndex, endIndex,
|
spannableContent.setSpan(spannableLink, beginIndex, endIndex,
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class AnnotationSpan extends URLSpan {
|
|||||||
@Override
|
@Override
|
||||||
public void updateDrawState(TextPaint ds) {
|
public void updateDrawState(TextPaint ds) {
|
||||||
super.updateDrawState(ds);
|
super.updateDrawState(ds);
|
||||||
ds.setUnderlineText(false);
|
ds.setUnderlineText(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CharSequence linkify(CharSequence rawText, LinkInfo... linkInfos) {
|
public static CharSequence linkify(CharSequence rawText, LinkInfo... linkInfos) {
|
||||||
|
|||||||
Reference in New Issue
Block a user