From 0c58c3707163765a65847d07ada963627eccb671 Mon Sep 17 00:00:00 2001 From: Kevin Lin Date: Fri, 28 Feb 2014 15:04:40 -0800 Subject: Fix redrawing chips with recipientEditText onSizeChanged when it has left and right padding. Change-Id: I4021ddc0359f6e7a807ba4b10d12c80fc01c25a4 --- chips/src/com/android/ex/chips/RecipientEditTextView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'chips') diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java index 5d5216e..9633587 100644 --- a/chips/src/com/android/ex/chips/RecipientEditTextView.java +++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java @@ -928,7 +928,8 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements Rect bounds; for (DrawableRecipientChip chip : chips) { bounds = chip.getBounds(); - if (getWidth() > 0 && bounds.right - bounds.left > getWidth()) { + if (getWidth() > 0 && bounds.right - bounds.left > + getWidth() - getPaddingLeft() - getPaddingRight()) { // Need to redraw that chip. replaceChip(chip, chip.getEntry()); } -- cgit v1.2.3