Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,当你这样做时,
Linkify.addLinks(mTextView, Linkify.EMAIL_ADDRESSES);
Linkify 使用什么颜色?这在 android.graphics.Color 中并不明显。
我有几段长长的东西,我只想要标准链接,我需要自己做一些我希望看起来一样的东西,但我不知道将它设置为什么颜色。我可以为所有其他人重新着色,但这似乎还有很长的路要走。
默认样式使用#05c5cf,而反向样式(我猜这是用于浅色主题)使用#0000EE(至少在 2.2 以下的平台版本中)。不过,不能保证它会保持这种状态,但我预计他们不会改变这一点(但谁能真正说出来)。
#05c5cf
#0000EE
Textview.getLinkTextColors().getDefaultColor()
默认情况下,链接使用android:textColorLink在主题中定义。
android:textColorLink