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

Commit 2295cc77 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio Committed by Android (Google) Code Review
Browse files

Merge "Fix bug #2246815 Error popups on EditText should span the width of the...

Merge "Fix bug #2246815 Error popups on EditText should span the width of the screen instead of the width of the EditText field"
parents 9c7b547e e4231461
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -4050,8 +4050,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        int wid = tv.getPaddingLeft() + tv.getPaddingRight();
        int ht = tv.getPaddingTop() + tv.getPaddingBottom();

        int defaultWidthInPixels = (int) (DEFAULT_ERROR_POPUP_MAX_WIDTH_IN_DP *
                getResources().getDisplayMetrics().density);
        int defaultWidthInPixels = getResources().getDimensionPixelSize(
                com.android.internal.R.dimen.textview_error_popup_default_width);
        Layout l = new StaticLayout(text, tv.getPaint(), defaultWidthInPixels,
                                    Layout.Alignment.ALIGN_NORMAL, 1, 0, true);
        float max = 0;
@@ -11441,6 +11441,4 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    private CorrectionHighlighter mCorrectionHighlighter;
    // New state used to change background based on whether this TextView is multiline.
    private static final int[] MULTILINE_STATE_SET = { R.attr.state_multiline };

    private static final int DEFAULT_ERROR_POPUP_MAX_WIDTH_IN_DP = 240;
}
+3 −0
Original line number Diff line number Diff line
@@ -175,4 +175,7 @@
    <!-- Width of the icon in a dropdown list -->
    <dimen name="dropdownitem_icon_width">32dip</dimen>

    <!-- Default width for a textview error popup -->
    <dimen name="textview_error_popup_default_width">240dip</dimen>

</resources>