如何设置可以在类中的XML内设置的android:autoLink="web",例如,此textView
final TextView finalTv;
finalTv.setMovementMethod(testCase);发布于 2017-01-12 09:32:05
根据安卓文档,您应该使用TextView的setAutoLinkMask (https://developer.android.com/reference/android/widget/TextView.html#setAutoLinkMask(int),传入以下枚举之一:
https://developer.android.com/reference/android/text/util/Linkify.html#ALL
对于web,您可能希望使用以下值:https://developer.android.com/reference/android/text/util/Linkify.html#WEB_URLS
https://stackoverflow.com/questions/41603655
复制相似问题