mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 15:32:52 +00:00
Fixed body text not being selectable
This commit is contained in:
parent
9c7ecdc25e
commit
0cbe9d311a
3 changed files with 4 additions and 4 deletions
|
@ -47,7 +47,7 @@ import android.text.SpannableStringBuilder;
|
|||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
import android.text.format.DateUtils;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.method.ArrowKeyMovementMethod;
|
||||
import android.text.style.ImageSpan;
|
||||
import android.text.style.QuoteSpan;
|
||||
import android.text.style.StyleSpan;
|
||||
|
@ -1530,6 +1530,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ibQuotes.setVisibility(has_quotes && show_expanded && !show_quotes ? View.VISIBLE : View.GONE);
|
||||
ibImages.setVisibility(has_images && show_expanded && !show_images ? View.VISIBLE : View.GONE);
|
||||
tvBody.setText(body);
|
||||
tvBody.setTextIsSelectable(false);
|
||||
tvBody.setTextIsSelectable(true);
|
||||
tvBody.setMovementMethod(new UrlHandler());
|
||||
tvBody.setVisibility(show_expanded ? View.VISIBLE : View.GONE);
|
||||
pbBody.setVisibility(View.GONE);
|
||||
|
@ -1570,7 +1572,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
});
|
||||
}
|
||||
|
||||
private class UrlHandler extends LinkMovementMethod {
|
||||
private class UrlHandler extends ArrowKeyMovementMethod {
|
||||
public boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event) {
|
||||
if (event.getAction() != MotionEvent.ACTION_UP)
|
||||
return false;
|
||||
|
|
|
@ -780,7 +780,6 @@
|
|||
android:minHeight="60dp"
|
||||
android:text="Body"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvNoInternetBody" />
|
||||
|
|
|
@ -770,7 +770,6 @@
|
|||
android:minHeight="60dp"
|
||||
android:text="Body"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvNoInternetBody" />
|
||||
|
|
Loading…
Reference in a new issue