Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13cb0fb9 authored by Daniel Norman's avatar Daniel Norman
Browse files

Support hyphenation in the A11y FAB undo snackbar.

No flag: very minor UX fix with low potential for regression.

Bug: 323021479
Flag: NONE
Test: Change a service name to be very long and include soft hyphens,
      observe hyphenation.
Change-Id: Id13e88a5e7f0f30d6d4286b86251bbda90de2f9c
parent b171b308
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Rect;
import android.text.Layout;
import android.view.Gravity;
import android.view.View;
import android.view.ViewTreeObserver;
@@ -162,6 +163,7 @@ class MenuMessageView extends LinearLayout implements
        mTextView.setPadding(/* left= */ 0, textPadding, /* right= */ 0, textPadding);
        mTextView.setTextSize(COMPLEX_UNIT_PX, textSize);
        mTextView.setTextColor(textColor);
        mTextView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL);

        final ColorStateList colorAccent = Utils.getColorAccent(getContext());
        mUndoButton.setText(res.getString(R.string.accessibility_floating_button_undo));