提问人:Martin Rupert Bulquerin 提问时间:6/10/2019 最后编辑:Kelechi DanielsMartin Rupert Bulquerin 更新时间:3/16/2023 访问量:323
textView.setMovementMethod(LinkMovementMethod.getInstance()) 正在删除 textview 中的对齐方式
textView.setMovementMethod(LinkMovementMethod.getInstance()) is removing justification in textview
问:
这是我的XML代码:
<TextView
android:id="@+id/txt_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/img_banner"
android:justificationMode="inter_word"
android:paddingEnd="@dimen/margin_size"
android:paddingStart="@dimen/margin_size"
android:paddingTop="@dimen/margin_size"
android:linksClickable="true"
android:clickable="true"
android:focusable="true"
android:autoLink="web"
android:layout_marginTop="@dimen/spacing"
android:textSize="15sp" />
而且,我正在使用此代码来允许以下链接:textview
txtView.setMovementMethod(LinkMovementMethod.getInstance());
如果没有 ,文本是对齐的,但链接是不可点击的。而且,当我设置链接时,链接是可点击的,但理由被禁用。setMovementMethod()
setMovementMethod()
答: 暂无答案
评论