Class TextViewUtils.URLSpanUnderlineSameColor

  • All Implemented Interfaces:
    android.os.Parcelable , android.text.ParcelableSpan , android.text.style.UpdateAppearance

    
    public class TextViewUtils.URLSpanUnderlineSameColor
    extends URLSpan
                        

    自定义链接样式:保留下划线,同时保持与普通文字一致的颜色。 通过先记录调用前的颜色,再覆盖为默认文字色,避免主题默认的链接色。

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void updateDrawState(@NonNull() TextPaint ds)
      • Methods inherited from class android.text.style.URLSpan

        describeContents, getSpanTypeId, getURL, onClick, writeToParcel
      • Methods inherited from class android.text.style.CharacterStyle

        getUnderlying, wrap
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextViewUtils.URLSpanUnderlineSameColor

        TextViewUtils.URLSpanUnderlineSameColor(String url)