Android 13: hyphenation

pull/207/head
M66B 3 years ago
parent 7b78f30037
commit 94fba73dec

@ -47,6 +47,7 @@ import android.graphics.Rect;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.graphics.drawable.AnimatedImageDrawable; import android.graphics.drawable.AnimatedImageDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.graphics.text.LineBreaker;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
@ -116,6 +117,7 @@ import androidx.constraintlayout.widget.Group;
import androidx.core.content.FileProvider; import androidx.core.content.FileProvider;
import androidx.core.content.pm.ShortcutInfoCompat; import androidx.core.content.pm.ShortcutInfoCompat;
import androidx.core.graphics.ColorUtils; import androidx.core.graphics.ColorUtils;
import androidx.core.os.BuildCompat;
import androidx.core.view.MenuCompat; import androidx.core.view.MenuCompat;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentManager;
@ -873,6 +875,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvSignedData = vsBody.findViewById(R.id.tvSignedData); tvSignedData = vsBody.findViewById(R.id.tvSignedData);
tvBody = vsBody.findViewById(R.id.tvBody); tvBody = vsBody.findViewById(R.id.tvBody);
if (BuildConfig.DEBUG && BuildCompat.isAtLeastT()) {
tvBody.setHyphenationFrequency(4 /* HYPHENATION_FREQUENCY_FULL_FAST */);
tvBody.setBreakStrategy(LineBreaker.BREAK_STRATEGY_HIGH_QUALITY);
}
wvBody = vsBody.findViewById(R.id.wvBody); wvBody = vsBody.findViewById(R.id.wvBody);
pbBody = vsBody.findViewById(R.id.pbBody); pbBody = vsBody.findViewById(R.id.pbBody);
vwRipple = vsBody.findViewById(R.id.vwRipple); vwRipple = vsBody.findViewById(R.id.vwRipple);

Loading…
Cancel
Save