Java Markwon不处理链接
我使用图书馆时遇到了一个问题。它不识别链接。我以Java Markwon不处理链接,java,android,markdown,Java,Android,Markdown,我使用图书馆时遇到了一个问题。它不识别链接。我以[name](link)的形式输入链接,它只显示名称,不会突出显示并响应对该名称的单击。如何修复此错误 我的毕业作品: implementation "ru.noties:markwon:2.0.1" implementation "ru.noties:markwon-image-loader:2.0.1" implementation "ru.noties:markwon-syntax-highlight:2.0.1" implementatio
[name](link)
的形式输入链接,它只显示名称,不会突出显示并响应对该名称的单击。如何修复此错误
我的毕业作品:
implementation "ru.noties:markwon:2.0.1"
implementation "ru.noties:markwon-image-loader:2.0.1"
implementation "ru.noties:markwon-syntax-highlight:2.0.1"
implementation "ru.noties:markwon-view:2.0.1"
配置:
public SpannableConfiguration getAboutTextConfig() {
ImageSizeResolverFitWidth imgSizeResolver = new ImageSizeResolverFitWidth();
return SpannableConfiguration.builder(this.context)
.asyncDrawableLoader(AsyncDrawableLoader.create())
.imageSizeResolver(imgSizeResolver)
.build();
}
我也试过:
代码:
act_txt.setMovementMethod(LinkMovementMethod.getInstance());
在布局中:
<TextView
android:id="@+id/act_txt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:autoLink="web"
android:focusable="true"
android:fontFamily="@font/roboto_regular"
android:letterSpacing="0.03"
android:lineSpacingExtra="12sp"
android:linksClickable="true"
android:paddingBottom="30dp"
android:textColor="@color/titleTextColor"
android:textSize="16sp"
android:textStyle="normal" />
很高兴你解决了你的问题。对于其他追逐这只兔子的人来说,在我的文本视图上设置LinkMovementMethod对我来说很有效
myTextView.movementMethod = LinkMovementMethod.getInstance()
改进了语法和格式。检测到问题。。。。。在布局文本视图中有设置自动链接-需要删除他。
myTextView.movementMethod = LinkMovementMethod.getInstance()