textView.setMovementMethod(LinkMovementMethod.getInstance()) is removing justification in textview

Viewed 199

This is my xml code:

<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" />

and im using this code to allow clickable links in textview.

txtView.setMovementMethod(LinkMovementMethod.getInstance());

without the setMovementMethod() the text is justified but the links aren't clickable and when the I add the setMovementMethod() the links are clickable but the justification is disabled. Please help.

0 Answers
Related